summaryrefslogtreecommitdiff
path: root/libpod/network/files.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-11-28 20:32:26 +0100
committerGitHub <noreply@github.com>2020-11-28 20:32:26 +0100
commit8b2c0a4fa3f85ec27f1460fa9fe4b3b1313b901a (patch)
tree7b2db7eb721c13b8f1258965ba1907a98fdce755 /libpod/network/files.go
parentf0d48aadb07fb3082c28213ae66ce57df7389138 (diff)
parent2f7bca0685c611d118db98f4c1a5f06370a9e286 (diff)
downloadpodman-8b2c0a4fa3f85ec27f1460fa9fe4b3b1313b901a.tar.gz
podman-8b2c0a4fa3f85ec27f1460fa9fe4b3b1313b901a.tar.bz2
podman-8b2c0a4fa3f85ec27f1460fa9fe4b3b1313b901a.zip
Merge pull request #8493 from Luap99/net-rm-macvlan
Fix problems with network remove
Diffstat (limited to 'libpod/network/files.go')
-rw-r--r--libpod/network/files.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/libpod/network/files.go b/libpod/network/files.go
index 846e5c62d..7f1e3ee18 100644
--- a/libpod/network/files.go
+++ b/libpod/network/files.go
@@ -14,6 +14,9 @@ import (
"github.com/pkg/errors"
)
+// ErrNoSuchNetworkInterface indicates that no network interface exists
+var ErrNoSuchNetworkInterface = errors.New("unable to find interface name for network")
+
// GetCNIConfDir get CNI configuration directory
func GetCNIConfDir(configArg *config.Config) string {
if len(configArg.Network.NetworkConfigDir) < 1 {
@@ -142,7 +145,7 @@ func GetInterfaceNameFromConfig(path string) (string, error) {
}
}
if len(name) == 0 {
- return "", errors.New("unable to find interface name for network")
+ return "", ErrNoSuchNetworkInterface
}
return name, nil
}