summaryrefslogtreecommitdiff
path: root/libnetwork/default_gateway.go
diff options
context:
space:
mode:
authoraboch <aboch@users.noreply.github.com>2015-12-03 13:51:43 -0800
committeraboch <aboch@users.noreply.github.com>2015-12-03 13:51:43 -0800
commit405a737a48c2984c35a007939e9d0080e6b5db73 (patch)
tree79795a1f3968b93b9ab548a7c373392d9bb7cee4 /libnetwork/default_gateway.go
parent9deda49cde07e0971b32808856bbaf634d56cd2a (diff)
parent141c51273f3bc36f6c04b98002cbdb17d7349a0c (diff)
downloaddocker-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.go3
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