From 1770ced6c07f7084fe3aa288b780b0be247ac995 Mon Sep 17 00:00:00 2001 From: Alessandro Boch Date: Sat, 19 Nov 2016 19:23:37 -0800 Subject: [PATCH] Fix bug in needDefaultGW() Signed-off-by: Alessandro Boch --- libnetwork/default_gateway.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libnetwork/default_gateway.go b/libnetwork/default_gateway.go index 163348b49f..b042539b88 100644 --- a/libnetwork/default_gateway.go +++ b/libnetwork/default_gateway.go @@ -123,7 +123,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 } }