Explorar o código

Merge pull request #44976 from corhere/libnet/fix-dns-opt-host-loopback

libnetwork: check DNS loopback with user DNS opts
Cory Snider %!s(int64=2) %!d(string=hai) anos
pai
achega
c910e47f53
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      libnetwork/sandbox_dns_unix.go

+ 1 - 1
libnetwork/sandbox_dns_unix.go

@@ -258,7 +258,7 @@ func (sb *Sandbox) setupDNS() error {
 		// After building the resolv.conf from the user config save the
 		// external resolvers in the sandbox. Note that --dns 127.0.0.x
 		// config refers to the loopback in the container namespace
-		sb.setExternalResolvers(newRC.Content, resolvconf.IPv4, false)
+		sb.setExternalResolvers(newRC.Content, resolvconf.IPv4, len(sb.config.dnsList) == 0)
 	} else {
 		// If the host resolv.conf file has 127.0.0.x container should
 		// use the host resolver for queries. This is supported by the