1 Commits
Author SHA1 Message Date
arsalanyavari e4df2a2608 libnetwork/resolvconf: fallback to loopback nameservers for internal resolver
When the host has no valid external nameservers (or /etc/resolv.conf is
missing/dangling), TransformForIntNS previously left ExtNameServers empty
and appended 'NO EXTERNAL NAMESERVERS DEFINED'. This caused the embedded
DNS resolver (127.0.0.11) in user-defined networks to have no upstream
nameservers, causing external queries to fail with SERVFAIL.

As already documented in TransformForIntNS:
'If no ExtNameServer addresses are found, use the defaults.'

Fallback to host loopback addresses (127.0.0.1, ::1) with HostLoopback: true,
matching host libc resolver fallback behavior when resolv.conf is missing.

Signed-off-by: arsalanyavari <arya48.yavari79@gmail.com>
2026-11-06 00:02:06 +03:30