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
Daniel J Walsh b9ee165a91 Compile regex on demand not in init
Should speed up app startup time a little since the compile
happens for all users of the library. Compile only on use.

[NO NEW TESTS NEEDED]

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2023-01-12 16:03:02 -05:00
Valentin Rothberg e17483b871 bump to golangci-lint v1.50.0
Used `go fmt` rules to migrate away from deprecated functions, for
instance `gofmt -w -s -r 'ioutil.TempDir(a, b) -> os.MkdirTemp(a, b)'`

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-10-17 15:03:07 +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