Browse Source

Set the compress flag for the responses from external DNS servers to
avoid sending DNS replies > 512 bytes

Signed-off-by: Santhosh Manohar <santhosh@docker.com>

Santhosh Manohar 9 years ago
parent
commit
cbb59adbd8
1 changed files with 1 additions and 0 deletions
  1. 1 0
      libnetwork/resolver.go

+ 1 - 0
libnetwork/resolver.go

@@ -229,6 +229,7 @@ func (r *resolver) ServeDNS(w dns.ResponseWriter, query *dns.Msg) {
 
 			resp, _, err = c.Exchange(query, addr)
 			if err == nil {
+				resp.Compress = true
 				break
 			}
 			log.Errorf("external resolution failed, %s", err)