summaryrefslogtreecommitdiff
path: root/libpod/network/network.go
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2021-09-02 10:11:05 +0200
committerPaul Holzinger <pholzing@redhat.com>2021-09-02 10:28:08 +0200
commitddeaaa47c89a00104c457554e0542d988f75e612 (patch)
tree6d1921211bd38c278a438ee9ec3892825c000762 /libpod/network/network.go
parent4207d959a68c1ee2b805b7113838580c14f4bbc6 (diff)
downloadpodman-ddeaaa47c89a00104c457554e0542d988f75e612.tar.gz
podman-ddeaaa47c89a00104c457554e0542d988f75e612.tar.bz2
podman-ddeaaa47c89a00104c457554e0542d988f75e612.zip
Drop dependency on iproute
We only use the `ip` util to remove a network interface. We can do this directly via the netlink lib, no need to call a external binary. [NO TESTS NEEDED] Fixes #11403 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'libpod/network/network.go')
-rw-r--r--libpod/network/network.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/libpod/network/network.go b/libpod/network/network.go
index 805988432..3b81ce776 100644
--- a/libpod/network/network.go
+++ b/libpod/network/network.go
@@ -194,8 +194,9 @@ func removeNetwork(config *config.Config, name string) error {
return errors.Wrapf(err, "failed to get live network names")
}
if util.StringInSlice(interfaceName, liveNetworkNames) {
- if err := RemoveInterface(interfaceName); err != nil {
- return errors.Wrapf(err, "failed to delete the network interface %q", interfaceName)
+ if err = RemoveInterface(interfaceName); err != nil {
+ // only log the error, it is not fatal
+ logrus.Infof("failed to remove network interface %s: %v", interfaceName, err)
}
}
}