Selaa lähdekoodia

Fix external DNS responses > 512 bytes getting dropped

Signed-off-by: Santhosh Manohar <santhosh@docker.com>
Santhosh Manohar 9 vuotta sitten
vanhempi
commit
bd5051931f
1 muutettua tiedostoa jossa 4 lisäystä ja 1 poistoa
  1. 4 1
      libnetwork/resolver.go

+ 4 - 1
libnetwork/resolver.go

@@ -361,7 +361,10 @@ func (r *resolver) ServeDNS(w dns.ResponseWriter, query *dns.Msg) {
 
 
 			// Timeout has to be set for every IO operation.
 			// Timeout has to be set for every IO operation.
 			extConn.SetDeadline(time.Now().Add(extIOTimeout))
 			extConn.SetDeadline(time.Now().Add(extIOTimeout))
-			co := &dns.Conn{Conn: extConn}
+			co := &dns.Conn{
+				Conn:    extConn,
+				UDPSize: uint16(maxSize),
+			}
 			defer co.Close()
 			defer co.Close()
 
 
 			// limits the number of outstanding concurrent queries.
 			// limits the number of outstanding concurrent queries.