Skip to content

Commit

Permalink
allow gw as empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
paulyufan2 committed Jan 21, 2025
1 parent 7ddf286 commit d1c2ae3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cni/network/invoker_cns.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ func getRoutes(cnsRoutes []cns.Route, skipDefaultRoutes bool) ([]network.RouteIn
}

gw := net.ParseIP(route.GatewayIPAddress)
if gw == nil && skipDefaultRoutes {
if skipDefaultRoutes {
return nil, errors.Wrap(errInvalidGatewayIP, route.GatewayIPAddress)
}

Expand Down

0 comments on commit d1c2ae3

Please sign in to comment.