瀏覽代碼

Loopback IP shouldn't be filtered from resolv.conf in host mode

Signed-off-by: Santhosh Manohar <santhosh@docker.com>
Santhosh Manohar 9 年之前
父節點
當前提交
4e25ffc8d9
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      libnetwork/sandbox.go

+ 5 - 0
libnetwork/sandbox.go

@@ -869,6 +869,11 @@ func (sb *sandbox) updateDNS(ipv6Enabled bool) error {
 		hashFile = sb.config.resolvConfHashFile
 	)
 
+	// This is for the host mode networking
+	if sb.config.originResolvConfPath != "" {
+		return nil
+	}
+
 	if len(sb.config.dnsList) > 0 || len(sb.config.dnsSearchList) > 0 || len(sb.config.dnsOptionsList) > 0 {
 		return nil
 	}