moby/libnetwork/internal
Rob Murray beb97f7fdf Refactor 'resolv.conf' generation.
Replace regex matching/replacement and re-reading of generated files
with a simple parser, and struct to remember and manipulate the file
content.

Annotate the generated file with a header comment saying the file is
generated, but can be modified, and a trailing comment describing how
the file was generated and listing external nameservers.

Always start with the host's resolv.conf file, whether generating config
for host networking, or with/without an internal resolver - rather than
editing a file previously generated for a different use-case.

Resolves an issue where rewrites of the generated file resulted in
default IPv6 nameservers being unnecessarily added to the config.

Signed-off-by: Rob Murray <rob.murray@docker.com>
2024-02-06 22:26:12 +00:00
..
caller libnetwork: remove unused "testutils" imports 2021-08-18 14:20:37 +02:00
kvstore libnetwork/internal/kvstore: prune unused method 2023-10-19 12:57:42 -04:00
netiputil Allow overlapping change in bridge's IPv6 network. 2023-12-18 16:10:41 +00:00
resolvconf Refactor 'resolv.conf' generation. 2024-02-06 22:26:12 +00:00
setmatrix add //go:build directives to prevent downgrading to go1.16 language 2023-12-15 15:24:15 +01:00