diff options
Diffstat (limited to 'libpod/networking_linux.go')
-rw-r--r-- | libpod/networking_linux.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libpod/networking_linux.go b/libpod/networking_linux.go index dbe2274d3..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 } @@ -632,7 +638,6 @@ func (r *Runtime) configureNetNS(ctr *Container, ctrNS ns.NetNS) ([]*cnitypes.Re } podName := getCNIPodName(ctr) - networks, _, err := ctr.networks() if err != nil { return nil, err |