summaryrefslogtreecommitdiff
path: root/libpod/network/files.go
diff options
context:
space:
mode:
authorPaul Holzinger <paul.holzinger@web.de>2021-02-21 16:27:25 +0100
committerPaul Holzinger <paul.holzinger@web.de>2021-02-22 15:51:49 +0100
commit9d818be7329929b05b93e432c408ee65726ec2c0 (patch)
tree866e87cfc163e1e4b9b6493a342f1c36e2d8d9e3 /libpod/network/files.go
parent6fbf73ed8bd34738f3f901df1e5d3b592a9c3354 (diff)
downloadpodman-9d818be7329929b05b93e432c408ee65726ec2c0.tar.gz
podman-9d818be7329929b05b93e432c408ee65726ec2c0.tar.bz2
podman-9d818be7329929b05b93e432c408ee65726ec2c0.zip
Fix podman network IDs handling
The libpod network logic knows about networks IDs but OCICNI does not. We cannot pass the network ID to OCICNI. Instead we need to make sure we only use network names internally. This is also important for libpod since we also only store the network names in the state. If we would add a ID there the same networks could accidentally be added twice. Fixes #9451 Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
Diffstat (limited to 'libpod/network/files.go')
-rw-r--r--libpod/network/files.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/libpod/network/files.go b/libpod/network/files.go
index f869d32c3..fe483e25c 100644
--- a/libpod/network/files.go
+++ b/libpod/network/files.go
@@ -81,9 +81,9 @@ func GetCNIConfigPathByNameOrID(config *config.Config, name string) (string, err
return "", errors.Wrap(define.ErrNoSuchNetwork, fmt.Sprintf("unable to find network configuration for %s", name))
}
-// ReadRawCNIConfByName reads the raw CNI configuration for a CNI
+// ReadRawCNIConfByNameOrID reads the raw CNI configuration for a CNI
// network by name
-func ReadRawCNIConfByName(config *config.Config, name string) ([]byte, error) {
+func ReadRawCNIConfByNameOrID(config *config.Config, name string) ([]byte, error) {
confFile, err := GetCNIConfigPathByNameOrID(config, name)
if err != nil {
return nil, err