From 2e5d3e8fb34ba3ab42d53da9ba39b71e1f53bb75 Mon Sep 17 00:00:00 2001 From: Federico Gimenez Date: Mon, 15 Nov 2021 10:43:42 +0100 Subject: 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 --- libpod/networking_linux.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libpod/networking_linux.go') diff --git a/libpod/networking_linux.go b/libpod/networking_linux.go index 9be600bb4..4150509d7 100644 --- a/libpod/networking_linux.go +++ b/libpod/networking_linux.go @@ -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}) } } } -- cgit v1.2.3-54-g00ecf