MCPcopy Create free account
hub / github.com/containerd/nerdctl / removeBridgeNetworkInterface

Function removeBridgeNetworkInterface

pkg/netutil/netutil_unix.go:399–409  ·  view source on GitHub ↗
(netIf string)

Source from the content-addressed store, hash-verified

397}
398
399func removeBridgeNetworkInterface(netIf string) error {
400 return rootlessutil.WithDetachedNetNSIfAny(func() error {
401 link, err := netlink.LinkByName(netIf)
402 if err == nil {
403 if err := netlink.LinkDel(link); err != nil {
404 return fmt.Errorf("failed to remove network interface %s: %v", netIf, err)
405 }
406 }
407 return nil
408 })
409}

Callers 1

cleanMethod · 0.85

Calls 1

WithDetachedNetNSIfAnyFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…