mirror of
https://github.com/containers/podman.git
synced 2025-08-06 03:19:52 +08:00
Introduce Address type to be used in secondary IPv4 and IPv6 inspect data
structure. Resolves a discrepancy between the types used in inspect for docker and podman. This causes a panic when using the docker client against podman when the secondary IP fields in the `NetworkSettings` inspect field are populated. Fixes containers#12165 Signed-off-by: Federico Gimenez <fgimenez@redhat.com>
This commit is contained in:
@ -1133,7 +1133,7 @@ func resultToBasicNetworkConfig(result types.StatusBlock) (define.InspectBasicNe
|
||||
config.IPPrefixLen = size
|
||||
config.Gateway = netAddress.Gateway.String()
|
||||
} else {
|
||||
config.SecondaryIPAddresses = append(config.SecondaryIPAddresses, netAddress.IPNet.IP.String())
|
||||
config.SecondaryIPAddresses = append(config.SecondaryIPAddresses, define.Address{Addr: netAddress.IPNet.IP.String(), PrefixLength: size})
|
||||
}
|
||||
} else {
|
||||
//ipv6
|
||||
@ -1142,7 +1142,7 @@ func resultToBasicNetworkConfig(result types.StatusBlock) (define.InspectBasicNe
|
||||
config.GlobalIPv6PrefixLen = size
|
||||
config.IPv6Gateway = netAddress.Gateway.String()
|
||||
} else {
|
||||
config.SecondaryIPv6Addresses = append(config.SecondaryIPv6Addresses, netAddress.IPNet.IP.String())
|
||||
config.SecondaryIPv6Addresses = append(config.SecondaryIPv6Addresses, define.Address{Addr: netAddress.IPNet.IP.String(), PrefixLength: size})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user