summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2020-04-27 13:12:12 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2020-04-27 13:12:19 +0200
commitc2f77a281f40c4219a8bcc266d6f3a8245cc5920 (patch)
treebb01c767ebbff79649ee58c300ab9a2c857d7c35
parentadb10783d9117bbbb8311079b26a08b8c3bd0b64 (diff)
downloadpodman-c2f77a281f40c4219a8bcc266d6f3a8245cc5920.tar.gz
podman-c2f77a281f40c4219a8bcc266d6f3a8245cc5920.tar.bz2
podman-c2f77a281f40c4219a8bcc266d6f3a8245cc5920.zip
specgen: relax test to accept default network
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
-rw-r--r--pkg/specgen/pod_validate.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/specgen/pod_validate.go b/pkg/specgen/pod_validate.go
index f2f90e58d..98d59549e 100644
--- a/pkg/specgen/pod_validate.go
+++ b/pkg/specgen/pod_validate.go
@@ -62,7 +62,7 @@ func (p *PodSpecGenerator) Validate() error {
return exclusivePodOptions("NoInfra", "NoManageResolvConf")
}
}
- if p.NetNS.NSMode != Bridge {
+ if p.NetNS.NSMode != "" && p.NetNS.NSMode != Bridge && p.NetNS.NSMode != Default {
if len(p.PortMappings) > 0 {
return errors.New("PortMappings can only be used with Bridge mode networking")
}