mirror of
https://github.com/containers/podman.git
synced 2025-10-17 11:14:40 +08:00
update github.com/vishvananda/netlink to v1.3.0
There seems to be one change[1] which breaks our tests, the route Dst field is no longer nil for a default route but rather the empty ipnet, i.e. 0.0.0.0/0 and ::/0 so fix that up in our code. [1] https://github.com/vishvananda/netlink/pull/852 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@ -256,9 +256,13 @@ func (c *Container) inspectJoinedNetworkNS(networkns string) (q types.StatusBloc
|
||||
}
|
||||
var gateway net.IP
|
||||
for _, route := range routes {
|
||||
// default gateway
|
||||
if route.Dst == nil {
|
||||
gateway = route.Gw
|
||||
// add default gateway
|
||||
// Dst is set to 0.0.0.0/0 or ::/0 which is the default route
|
||||
if route.Dst != nil && route.Dst.IP.IsUnspecified() {
|
||||
ones, _ := route.Dst.Mask.Size()
|
||||
if ones == 0 {
|
||||
gateway = route.Gw
|
||||
}
|
||||
}
|
||||
}
|
||||
result.Interfaces = make(map[string]types.NetInterface)
|
||||
|
Reference in New Issue
Block a user