Commit Graph

4 Commits

Author SHA1 Message Date
Paul Holzinger 27aeb4ad8c libnetwork/resolvconf: filter out ipv6 link local
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>
2024-11-07 16:49:02 +01:00
Paul Holzinger 805e7ae406 update golangci-lint to 1.60.3
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>
2024-09-03 15:57:02 +02:00
Paul Holzinger 0d0a246be5 resolvconf: add option to keep orig resolv content
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>
2022-05-23 16:09:10 +02:00
Paul Holzinger 18dde50aa4 libnetwork: add new resolvconf package
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>
2022-05-23 16:09:03 +02:00