From e03232c06a76ed399b654ffd0ac81c36e4c62fb0 Mon Sep 17 00:00:00 2001 From: Lei Jitang Date: Mon, 26 Jun 2017 02:04:57 -0400 Subject: [PATCH] Fix bug in needDefaultGW() cherry-pick from: https://github.com/docker/libnetwork/pull/1563 Signed-off-by: Alessandro Boch Signed-off-by: Lei Jitang --- vendor/src/github.com/docker/libnetwork/default_gateway.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/src/github.com/docker/libnetwork/default_gateway.go b/vendor/src/github.com/docker/libnetwork/default_gateway.go index 31cf86d1d4a62..99d92405e8a3c 100644 --- a/vendor/src/github.com/docker/libnetwork/default_gateway.go +++ b/vendor/src/github.com/docker/libnetwork/default_gateway.go @@ -107,7 +107,7 @@ func (sb *sandbox) needDefaultGW() bool { return false } for _, r := range ep.StaticRoutes() { - if r.Destination.String() == "0.0.0.0/0" { + if r.Destination != nil && r.Destination.String() == "0.0.0.0/0" { return false } }