One thing I noticed in the recent aardvark-dns bug[1] that we copy link
local nameservers into the container. This makes no sense as the link
local address contains a zone (interface name/index) and cannot work
without it. However a container by design will have a different
interface name/index so the address can never work in the normal case.
Only when we do share the host netns then we should keep it.
[1] https://github.com/containers/aardvark-dns/pull/537
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Contains fixes for new linters, removed depracted and removed linters
from the config.
Most notably because we use go 1.22 now we can get rid of the copy for
loop vars[1]. Also as of the go 1..2 we can use the new int range syntax
in for loops the new intrange linter checks that.
[1] https://go.dev/blog/loopvar-preview
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Even when a custom nameserver is set by the caller they may wish to
still keep the original nameserver too. This is needed by podman/buildah
when they only want to add the slirp4netns dns ip at the beginning for
example.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
both buildah and podman currently use a slightly different resolvconf lib,
to prevent duplication and having to fix bugs twice they should both use
this new package instead.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>