Use RTA_PREFSRC instead of RTA_SRC to make AddRoute() works with a provided source ip address.

Docker-DCO-1.1-Signed-off-by: Albert Zhang <zhgwenming@gmail.com> (github: zhgwenming)
enable hairpin mode on virtual interface bridge port

This is to support being able to DNAT/MASQ traffic from a container back into itself (dotcloud/docker#4442)

Docker-DCO-1.1-Signed-off-by: Patrick Hemmer <patrick.hemmer@gmail.com> (github: phemmer)
Sample configuration for ip routing Source Address Selection

Docker-DCO-1.1-Signed-off-by: Albert Zhang <zhgwenming@gmail.com> (github: zhgwenming)
Merge pull request #62 from phemmer/docker/4442-hairpin-nat

enable hairpin mode on virtual interface bridge port
Test update for routing Source Address Selection

Docker-DCO-1.1-Signed-off-by: Albert Zhang <zhgwenming@gmail.com> (github: zhgwenming)
Merge pull request #250 from zhgwenming/master

Make AddRoute() works with a provided source ip address.
user: *: refactor and expand libcontainer/user API

This patch refactors most of GetUserGroupSupplementaryHome and its
signature, to make using it much simpler. The private parsing ftunctions
have also been exposed (parsePasswdFile, parseGroupFile) to allow custom
data source to be used (increasing the versatility of the user/ tools).

In addition, file path wrappers around the formerly private API
functions have been added to make usage of the API for callers easier if
the files that are being parsed are on the filesystem (while the
io.Reader APIs are exposed for non-traditional usecases).

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (github: cyphar)
user: lookup: added os/user-like lookup API

This patch adds an os/user-like user lookup API, implemented in pure Go.
It also has some features not present in the standard library
implementation (such as group lookups).

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (github: cyphar)
user: add unit tests for GetExecUser

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com> (github: cyphar)
Merge pull request #158 from cyphar/refactor-expose-user

Refactor and expose private functions within `libcontainer/user`.
Fix the return code check for ParseIP.

Signed-off-by: Mrunal Patel <mrunalp@gmail.com> (github: mrunalp)
Merge pull request #259 from mrunalp/fix_parse_ip_rc

Fix the return code check for ParseIP.
Fix typo in json tag

throlling_data -> throttling_data

Signed-off-by: Donald Huang <don.hcd@gmail.com>
Merge pull request #260 from donhcd/fix_typo

Fix typo in json tag
Updated cover tool import path.

Signed-off-by: Hans Rødtang <hansrodtang@gmail.com>
Merge pull request #262 from hansrodtang/patch-1

Updated cover tool import path.
use os.Environ() to set exec command's env

because `LoadContainerEnvironment` is already run, os.Environ() will return the
correct environment variables for the exec command (i.e. removed duplicated
envs, set HOME for user etc...)

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
Merge pull request #264 from dqminh/fix-exec-env

Set correct env variables for `docker exec` commands
Update the path to project from hack

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Merge pull request #265 from crosbymichael/fix-dind

Update the path to project from hack