Files
podman/vendor/go.podman.io/common/libnetwork/cni/config_linux.go
2025-09-01 12:33:04 +02:00

20 lines
384 B
Go

//go:build (linux || freebsd) && cni
package cni
import (
"github.com/sirupsen/logrus"
"github.com/vishvananda/netlink"
)
func deleteLink(name string) {
link, err := netlink.LinkByName(name)
if err == nil {
err = netlink.LinkDel(link)
// only log the error, it is not fatal
if err != nil {
logrus.Infof("Failed to remove network interface %s: %v", name, err)
}
}
}