summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-06-08 09:30:26 +0200
committerGitHub <noreply@github.com>2021-06-08 09:30:26 +0200
commit74a0dc7d856af60a39944920283569ce4a21ac82 (patch)
tree751cd91a7f4e4db5abf30d42ca47487d432ea6a6 /cmd/podman
parentdf3b6da12c1fb934de3b08f72d585d4273de7835 (diff)
parent260192670f9128438a39cf3d1de40a3d0bc8e9ee (diff)
downloadpodman-74a0dc7d856af60a39944920283569ce4a21ac82.tar.gz
podman-74a0dc7d856af60a39944920283569ce4a21ac82.tar.bz2
podman-74a0dc7d856af60a39944920283569ce4a21ac82.zip
Merge pull request #10591 from mheon/fix_10569
Fix compat create with NetworkMode=default
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/common/create_opts.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/podman/common/create_opts.go b/cmd/podman/common/create_opts.go
index 76d7345fc..66778f519 100644
--- a/cmd/podman/common/create_opts.go
+++ b/cmd/podman/common/create_opts.go
@@ -249,7 +249,7 @@ func ContainerCreateToContainerCLIOpts(cc handlers.CreateContainerConfig, rtc *c
}
// netMode
- nsmode, _, err := specgen.ParseNetworkNamespace(string(cc.HostConfig.NetworkMode), true)
+ nsmode, networks, err := specgen.ParseNetworkNamespace(string(cc.HostConfig.NetworkMode), true)
if err != nil {
return nil, nil, err
}
@@ -322,7 +322,7 @@ func ContainerCreateToContainerCLIOpts(cc handlers.CreateContainerConfig, rtc *c
netInfo.Aliases = aliases
netInfo.CNINetworks = cniNetworks
case len(cc.HostConfig.NetworkMode) > 0:
- netInfo.CNINetworks = []string{string(cc.HostConfig.NetworkMode)}
+ netInfo.CNINetworks = networks
}
parsedTmp := make([]string, 0, len(cc.HostConfig.Tmpfs))