Przeglądaj źródła

Fix bug in needDefaultGW()

Signed-off-by: Alessandro Boch <aboch@docker.com>
Alessandro Boch 8 lat temu
rodzic
commit
1770ced6c0
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      libnetwork/default_gateway.go

+ 1 - 1
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
 			}
 		}