summaryrefslogtreecommitdiff
path: root/libpod/networking_linux.go
diff options
context:
space:
mode:
authorSascha Grunert <sgrunert@suse.com>2019-07-03 10:00:26 +0200
committerSascha Grunert <sgrunert@suse.com>2019-07-03 11:35:44 +0200
commit143ed8b826ef5b63a805198412b2d30dd2cd07f5 (patch)
tree8355b26929b16266cacdf059a5c77f51d08b4fc9 /libpod/networking_linux.go
parent23711589f06b243fde07b9fcecb1cdc11c98a616 (diff)
downloadpodman-143ed8b826ef5b63a805198412b2d30dd2cd07f5.tar.gz
podman-143ed8b826ef5b63a805198412b2d30dd2cd07f5.tar.bz2
podman-143ed8b826ef5b63a805198412b2d30dd2cd07f5.zip
Vendor latest OCICNI version
This is needed for dual stack IPv6 support within CRI-O. Because the API changed within OCICNI, we have to adapt the internal linux networking as well. Signed-off-by: Sascha Grunert <sgrunert@suse.com>
Diffstat (limited to 'libpod/networking_linux.go')
-rw-r--r--libpod/networking_linux.go22
1 files changed, 12 insertions, 10 deletions
diff --git a/libpod/networking_linux.go b/libpod/networking_linux.go
index 93ec157c5..27585b8d5 100644
--- a/libpod/networking_linux.go
+++ b/libpod/networking_linux.go
@@ -28,21 +28,23 @@ import (
// Get an OCICNI network config
func (r *Runtime) getPodNetwork(id, name, nsPath string, networks []string, ports []ocicni.PortMapping, staticIP net.IP) ocicni.PodNetwork {
+ defaultNetwork := r.netPlugin.GetDefaultNetworkName()
network := ocicni.PodNetwork{
- Name: name,
- Namespace: name, // TODO is there something else we should put here? We don't know about Kube namespaces
- ID: id,
- NetNS: nsPath,
- PortMappings: ports,
- Networks: networks,
+ Name: name,
+ Namespace: name, // TODO is there something else we should put here? We don't know about Kube namespaces
+ ID: id,
+ NetNS: nsPath,
+ Networks: networks,
+ RuntimeConfig: map[string]ocicni.RuntimeConfig{
+ defaultNetwork: {PortMappings: ports},
+ },
}
if staticIP != nil {
- defaultNetwork := r.netPlugin.GetDefaultNetworkName()
-
network.Networks = []string{defaultNetwork}
- network.NetworkConfig = make(map[string]ocicni.NetworkConfig)
- network.NetworkConfig[defaultNetwork] = ocicni.NetworkConfig{IP: staticIP.String()}
+ network.RuntimeConfig = map[string]ocicni.RuntimeConfig{
+ defaultNetwork: {IP: staticIP.String(), PortMappings: ports},
+ }
}
return network