diff options
author | aboch <aboch@users.noreply.github.com> | 2015-12-03 13:51:43 -0800 |
---|---|---|
committer | aboch <aboch@users.noreply.github.com> | 2015-12-03 13:51:43 -0800 |
commit | 405a737a48c2984c35a007939e9d0080e6b5db73 (patch) | |
tree | 79795a1f3968b93b9ab548a7c373392d9bb7cee4 /libnetwork/default_gateway.go | |
parent | 9deda49cde07e0971b32808856bbaf634d56cd2a (diff) | |
parent | 141c51273f3bc36f6c04b98002cbdb17d7349a0c (diff) | |
download | docker-405a737a48c2984c35a007939e9d0080e6b5db73.tar.gz |
Merge pull request #778 from chenchun/disable-default-gateway
Add a network option to disable default gateway
Diffstat (limited to 'libnetwork/default_gateway.go')
-rw-r--r-- | libnetwork/default_gateway.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libnetwork/default_gateway.go b/libnetwork/default_gateway.go index 4527c9e8ad..139242c6a5 100644 --- a/libnetwork/default_gateway.go +++ b/libnetwork/default_gateway.go @@ -103,6 +103,9 @@ func (sb *sandbox) needDefaultGW() bool { if ep.getNetwork().Type() == "null" || ep.getNetwork().Type() == "host" { continue } + if ep.joinInfo.disableGatewayService { + return false + } // TODO v6 needs to be handled. if len(ep.Gateway()) > 0 { return false |