(netIf string)
| 397 | } |
| 398 | |
| 399 | func 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 | } |
no test coverage detected
searching dependent graphs…