summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
Diffstat (limited to 'libpod')
-rw-r--r--libpod/network/cni/cni_exec.go2
-rw-r--r--libpod/networking_linux.go8
2 files changed, 8 insertions, 2 deletions
diff --git a/libpod/network/cni/cni_exec.go b/libpod/network/cni/cni_exec.go
index 0aec3d4f1..c4d7f49f7 100644
--- a/libpod/network/cni/cni_exec.go
+++ b/libpod/network/cni/cni_exec.go
@@ -8,7 +8,7 @@
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
-// http://www.apache.org/licenses/LICENSE-2.0
+// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/libpod/networking_linux.go b/libpod/networking_linux.go
index 5ade0849d..9aa6cab15 100644
--- a/libpod/networking_linux.go
+++ b/libpod/networking_linux.go
@@ -185,7 +185,13 @@ func (r *RootlessCNI) Do(toRun func() error) error {
// if there is no symlink exit
break
}
- resolvePath = filepath.Join(filepath.Dir(resolvePath), link)
+ if filepath.IsAbs(link) {
+ // link is as an absolute path
+ resolvePath = link
+ } else {
+ // link is as a relative, join it with the previous path
+ resolvePath = filepath.Join(filepath.Dir(resolvePath), link)
+ }
if strings.HasPrefix(resolvePath, "/run/") {
break
}