mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Revert "libnet: populateNetworkResourcesOS: updateDNS only if !needResolver"
This reverts commit 937246a868.
Signed-off-by: Albin Kerouanton <albin.kerouanton@docker.com>
This commit is contained in:
@@ -366,11 +366,6 @@ func (sb *Sandbox) populateNetworkResourcesOS(ctx context.Context, ep *Endpoint)
|
||||
|
||||
if ep.needResolver() {
|
||||
sb.startResolver(false)
|
||||
} else {
|
||||
// Make sure /etc/resolv.conf is set up.
|
||||
if err := sb.updateDNS(ep.getNetwork().enableIPv6); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if i != nil && i.srcName != "" {
|
||||
@@ -453,6 +448,10 @@ func (sb *Sandbox) populateNetworkResourcesOS(ctx context.Context, ep *Endpoint)
|
||||
}
|
||||
|
||||
sb.addHostsEntries(ctx, ep.getEtcHostsAddrs())
|
||||
// Make sure /etc/resolv.conf is set up.
|
||||
if err := sb.updateDNS(ep.getNetwork().enableIPv6); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Populate load balancer only after updating all the other
|
||||
// information including gateway and other routes so that
|
||||
|
||||
Reference in New Issue
Block a user