Skip to content

Commit

Permalink
Merge pull request #4853 from mheon/do_not_configure_with_slirp
Browse files Browse the repository at this point in the history
Do not configure CNI when slirp4netns is requested
  • Loading branch information
openshift-merge-robot authored Jan 13, 2020
2 parents e83a1b8 + 6e2ed9a commit c1d9366
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libpod/networking_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func (r *Runtime) createNetNS(ctr *Container) (n ns.NetNS, q []*cnitypes.Result,
logrus.Debugf("Made network namespace at %s for container %s", ctrNS.Path(), ctr.ID())

networkStatus := []*cnitypes.Result{}
if !rootless.IsRootless() {
if !rootless.IsRootless() && ctr.config.NetMode != "slirp4netns" {
networkStatus, err = r.configureNetNS(ctr, ctrNS)
}
return ctrNS, networkStatus, err
Expand Down Expand Up @@ -462,7 +462,7 @@ func (r *Runtime) teardownNetNS(ctr *Container) error {
logrus.Debugf("Tearing down network namespace at %s for container %s", ctr.state.NetNS.Path(), ctr.ID())

// rootless containers do not use the CNI plugin
if !rootless.IsRootless() {
if !rootless.IsRootless() && ctr.config.NetMode != "slirp4netns" {
var requestedIP net.IP
if ctr.requestedIP != nil {
requestedIP = ctr.requestedIP
Expand Down

0 comments on commit c1d9366

Please sign in to comment.