Skip to content

Commit 6b20ec7

Browse files
authored
Merge pull request #1563 from aboch/route
Fix bug in needDefaultGW()
2 parents f36e733 + 09a2c50 commit 6b20ec7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

default_gateway.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ func (sb *sandbox) needDefaultGW() bool {
123123
return false
124124
}
125125
for _, r := range ep.StaticRoutes() {
126-
if r.Destination.String() == "0.0.0.0/0" {
126+
if r.Destination != nil && r.Destination.String() == "0.0.0.0/0" {
127127
return false
128128
}
129129
}

0 commit comments

Comments
 (0)