瀏覽代碼

Fix bug in needDefaultGW()

Signed-off-by: Alessandro Boch <aboch@docker.com>
Alessandro Boch 8 年之前
父節點
當前提交
1770ced6c0
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      libnetwork/default_gateway.go

+ 1 - 1
libnetwork/default_gateway.go

@@ -123,7 +123,7 @@ func (sb *sandbox) needDefaultGW() bool {
 			return false
 			return false
 		}
 		}
 		for _, r := range ep.StaticRoutes() {
 		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
 				return false
 			}
 			}
 		}
 		}