mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Vendoring miekg/dns @ 75e6e86cc601825c5dbcd4e0c209eab180997cd7
- Fixes the issue of Shutdown() not working, resulting in hung goroutines Signed-off-by: Santhosh Manohar <santhosh@docker.com>
This commit is contained in:
parent
a495c148a5
commit
bccf653082
3 changed files with 14 additions and 1 deletions
|
@ -43,7 +43,7 @@ fix_rewritten_imports github.com/coreos/etcd
|
|||
clone git github.com/ugorji/go 5abd4e96a45c386928ed2ca2a7ef63e2533e18ec
|
||||
clone git github.com/hashicorp/consul v0.5.2
|
||||
clone git github.com/boltdb/bolt v1.1.0
|
||||
clone git github.com/miekg/dns d27455715200c7d3e321a1e5cadb27c9ee0b0f02
|
||||
clone git github.com/miekg/dns 75e6e86cc601825c5dbcd4e0c209eab180997cd7
|
||||
|
||||
# get graph and distribution packages
|
||||
clone git github.com/docker/distribution cb08de17d74bef86ce6c5abe8b240e282f5750be
|
||||
|
|
3
vendor/src/github.com/miekg/dns/server.go
vendored
3
vendor/src/github.com/miekg/dns/server.go
vendored
|
@ -535,6 +535,9 @@ Redo:
|
|||
h.ServeDNS(w, req) // Writes back to the client
|
||||
|
||||
Exit:
|
||||
if w.tcp == nil {
|
||||
return
|
||||
}
|
||||
// TODO(miek): make this number configurable?
|
||||
if q > maxTCPQueries { // close socket after this many queries
|
||||
w.Close()
|
||||
|
|
10
vendor/src/github.com/miekg/dns/udp_linux.go
vendored
10
vendor/src/github.com/miekg/dns/udp_linux.go
vendored
|
@ -24,6 +24,12 @@ func setUDPSocketOptions4(conn *net.UDPConn) error {
|
|||
if err := syscall.SetsockoptInt(int(file.Fd()), syscall.IPPROTO_IP, syscall.IP_PKTINFO, 1); err != nil {
|
||||
return err
|
||||
}
|
||||
// Calling File() above results in the connection becoming blocking, we must fix that.
|
||||
// See https://github.com/miekg/dns/issues/279
|
||||
err = syscall.SetNonblock(int(file.Fd()), true)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -36,6 +42,10 @@ func setUDPSocketOptions6(conn *net.UDPConn) error {
|
|||
if err := syscall.SetsockoptInt(int(file.Fd()), syscall.IPPROTO_IPV6, syscall.IPV6_RECVPKTINFO, 1); err != nil {
|
||||
return err
|
||||
}
|
||||
err = syscall.SetNonblock(int(file.Fd()), true)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue