diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-09-29 15:34:37 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-29 15:34:37 +0000 |
commit | 63f0bb93f8b51945e37ad04e977d57942f4dd148 (patch) | |
tree | 621c068638bb457f3695407b77bfb5ce7de4f0e5 /pkg/specgen/pod_validate.go | |
parent | 53aa9764c48783814710919f1b78185cd13db35c (diff) | |
parent | b6176d8987a0049a253fd7a70b2cd8e17bd50b53 (diff) | |
download | podman-63f0bb93f8b51945e37ad04e977d57942f4dd148.tar.gz podman-63f0bb93f8b51945e37ad04e977d57942f4dd148.tar.bz2 podman-63f0bb93f8b51945e37ad04e977d57942f4dd148.zip |
Merge pull request #7783 from ashley-cui/slirp
Add support for slirp network for pods
Diffstat (limited to 'pkg/specgen/pod_validate.go')
-rw-r--r-- | pkg/specgen/pod_validate.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/specgen/pod_validate.go b/pkg/specgen/pod_validate.go index 907c0bb69..a6c61a203 100644 --- a/pkg/specgen/pod_validate.go +++ b/pkg/specgen/pod_validate.go @@ -72,9 +72,9 @@ func (p *PodSpecGenerator) Validate() error { return exclusivePodOptions("NoInfra", "NoManageResolvConf") } } - if p.NetNS.NSMode != "" && p.NetNS.NSMode != Bridge && p.NetNS.NSMode != Default { + if p.NetNS.NSMode != "" && p.NetNS.NSMode != Bridge && p.NetNS.NSMode != Slirp && p.NetNS.NSMode != Default { if len(p.PortMappings) > 0 { - return errors.New("PortMappings can only be used with Bridge mode networking") + return errors.New("PortMappings can only be used with Bridge or slirp4netns networking") } if len(p.CNINetworks) > 0 { return errors.New("CNINetworks can only be used with Bridge mode networking") |