summaryrefslogtreecommitdiff
path: root/pkg/spec/spec.go
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2018-11-21 17:38:28 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2018-11-27 21:10:16 +0100
commit4203df69aca13f14e43ad32a9b7ffb6cfb8c1016 (patch)
treeb1d255b5b9b92fa400b1a38a99694609501e4dbf /pkg/spec/spec.go
parent266c4952a89be89b1741f9fa69443f51387dd5c6 (diff)
downloadpodman-4203df69aca13f14e43ad32a9b7ffb6cfb8c1016.tar.gz
podman-4203df69aca13f14e43ad32a9b7ffb6cfb8c1016.tar.bz2
podman-4203df69aca13f14e43ad32a9b7ffb6cfb8c1016.zip
rootless: add new netmode "slirp4netns"
so that inspect reports the correct network configuration. Closes: https://github.com/containers/libpod/issues/1453 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'pkg/spec/spec.go')
-rw-r--r--pkg/spec/spec.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/spec/spec.go b/pkg/spec/spec.go
index b1cca2c9e..05be00864 100644
--- a/pkg/spec/spec.go
+++ b/pkg/spec/spec.go
@@ -453,6 +453,9 @@ func addNetNS(config *CreateConfig, g *generate.Generator) error {
} else if IsPod(string(netMode)) {
logrus.Debug("Using pod netmode, unless pod is not sharing")
return nil
+ } else if netMode.IsSlirp4netns() {
+ logrus.Debug("Using slirp4netns netmode")
+ return nil
} else if netMode.IsUserDefined() {
logrus.Debug("Using user defined netmode")
return nil