diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-02-25 21:31:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-25 21:31:50 +0100 |
commit | e45c44208067f4ac26c5136842d5a17478f5234c (patch) | |
tree | deef90c9c3b502d137a64135ed0f125fbaeeb38b /libpod/options.go | |
parent | 6fc18e7d07e8263faca8341efb0220bf4be4f417 (diff) | |
parent | b87bdced1fa967846916b47cba5f093f72f3d11f (diff) | |
download | podman-e45c44208067f4ac26c5136842d5a17478f5234c.tar.gz podman-e45c44208067f4ac26c5136842d5a17478f5234c.tar.bz2 podman-e45c44208067f4ac26c5136842d5a17478f5234c.zip |
Merge pull request #2358 from rhatdan/namespace
Fix up handling of user defined network namespaces
Diffstat (limited to 'libpod/options.go')
-rw-r--r-- | libpod/options.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libpod/options.go b/libpod/options.go index 9aa020b56..e22c81f91 100644 --- a/libpod/options.go +++ b/libpod/options.go @@ -904,10 +904,10 @@ func WithNetNS(portMappings []ocicni.PortMapping, postConfigureNetNS bool, netmo } ctr.config.PostConfigureNetNS = postConfigureNetNS - ctr.config.CreateNetNS = true + ctr.config.NetMode = namespaces.NetworkMode(netmode) + ctr.config.CreateNetNS = !ctr.config.NetMode.IsUserDefined() ctr.config.PortMappings = portMappings ctr.config.Networks = networks - ctr.config.NetMode = namespaces.NetworkMode(netmode) return nil } |