summaryrefslogtreecommitdiff
path: root/libnetwork/default_gateway.go
diff options
context:
space:
mode:
authorChun Chen <ramichen@tencent.com>2015-12-03 10:07:44 +0800
committerChun Chen <ramichen@tencent.com>2015-12-03 12:51:28 +0800
commit141c51273f3bc36f6c04b98002cbdb17d7349a0c (patch)
treeaa79a6fc5bfd4ee941ce628eebae83c6948f6957 /libnetwork/default_gateway.go
parent6f3c0e34f3e26ac3ee656c9e03975d9f16e89a80 (diff)
downloaddocker-141c51273f3bc36f6c04b98002cbdb17d7349a0c.tar.gz
Add DisableGatewayService in JoinInfo to offering drivers the ability to disable default gateway
Signed-off-by: Chun Chen <ramichen@tencent.com>
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 5d58b06175..d136ab1fc2 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