diff options
Diffstat (limited to 'libpod/networking_freebsd.go')
-rw-r--r-- | libpod/networking_freebsd.go | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/libpod/networking_freebsd.go b/libpod/networking_freebsd.go index 16c941767..3833154c5 100644 --- a/libpod/networking_freebsd.go +++ b/libpod/networking_freebsd.go @@ -183,37 +183,6 @@ func (r *Runtime) createNetNS(ctr *Container) (n *jailNetNS, q map[string]types. return ctrNS, networkStatus, err } -// Tear down a container's network configuration and joins the -// rootless net ns as rootless user -func (r *Runtime) teardownNetwork(ns string, opts types.NetworkOptions) error { - if err := r.network.Teardown(ns, types.TeardownOptions{NetworkOptions: opts}); err != nil { - return fmt.Errorf("tearing down network namespace configuration for container %s: %w", opts.ContainerID, err) - } - return nil -} - -// Tear down a container's CNI network configuration, but do not tear down the -// namespace itself. -func (r *Runtime) teardownCNI(ctr *Container) error { - if ctr.state.NetNS == nil { - // The container has no network namespace, we're set - return nil - } - - logrus.Debugf("Tearing down network namespace at %s for container %s", ctr.state.NetNS.Name, ctr.ID()) - - networks, err := ctr.networks() - if err != nil { - return err - } - - if !ctr.config.NetMode.IsSlirp4netns() && len(networks) > 0 { - netOpts := ctr.getNetworkOptions(networks) - return r.teardownNetwork(ctr.state.NetNS.Name, netOpts) - } - return nil -} - // Tear down a network namespace, undoing all state associated with it. func (r *Runtime) teardownNetNS(ctr *Container) error { if err := r.unexposeMachinePorts(ctr.config.PortMappings); err != nil { |