diff options
author | Paul Holzinger <pholzing@redhat.com> | 2021-08-16 11:03:16 +0200 |
---|---|---|
committer | Paul Holzinger <pholzing@redhat.com> | 2021-08-19 17:45:51 +0200 |
commit | 15fff7d918a782875ab130a6d96665aedc0ba967 (patch) | |
tree | 167124e3eee310636bc04027d42bfb6db5d4f2b7 /pkg/netns | |
parent | 63e06acfe60ad52d7258e477ee111c2a800e39b7 (diff) | |
download | podman-15fff7d918a782875ab130a6d96665aedc0ba967.tar.gz podman-15fff7d918a782875ab130a6d96665aedc0ba967.tar.bz2 podman-15fff7d918a782875ab130a6d96665aedc0ba967.zip |
Fix rootless cni dns without systemd stub resolver
When a host uses systemd-resolved but not the resolved stub resolver the
following symlinks are created: `/etc/resolv.conf` ->
`/run/systemd/resolve/stub-resolv.conf` -> `/run/systemd/resolve/resolv.conf`.
Because the code uses filepath.EvalSymlinks we put the new resolv.conf
to `/run/systemd/resolve/resolv.conf` but the `/run/systemd/resolve/stub-resolv.conf`
link does not exists in the mount ns.
To fix this we will walk the symlinks manually until we reach the first
one under `/run` and use this for the resolv.conf file destination.
This fixes a regression which was introduced in e73d4829900c.
Fixes #11222
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'pkg/netns')
0 files changed, 0 insertions, 0 deletions