aboutsummaryrefslogtreecommitdiff
path: root/libpod/networking_linux.go
diff options
context:
space:
mode:
authorFederico Gimenez <fgimenez@redhat.com>2021-11-15 10:43:42 +0100
committerFederico Gimenez <fgimenez@redhat.com>2021-11-18 17:04:49 +0100
commit2e5d3e8fb34ba3ab42d53da9ba39b71e1f53bb75 (patch)
tree628cc3eb762c7af5383eff731c6e599d5fa6576e /libpod/networking_linux.go
parent9b964945d661d4f97b4a97f2f67d33f9dcd11e50 (diff)
downloadpodman-2e5d3e8fb34ba3ab42d53da9ba39b71e1f53bb75.tar.gz
podman-2e5d3e8fb34ba3ab42d53da9ba39b71e1f53bb75.tar.bz2
podman-2e5d3e8fb34ba3ab42d53da9ba39b71e1f53bb75.zip
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>
Diffstat (limited to 'libpod/networking_linux.go')
-rw-r--r--libpod/networking_linux.go4
1 files changed, 2 insertions, 2 deletions
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})
}
}
}