mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-04-04 21:57:44 +03:00
Update miekg/dns
This commit is contained in:
parent
34909babfb
commit
1ae2281588
39 changed files with 274 additions and 29 deletions
9
vendor/github.com/miekg/dns/server.go
generated
vendored
9
vendor/github.com/miekg/dns/server.go
generated
vendored
|
@ -752,11 +752,10 @@ func (w *response) Write(m []byte) (int, error) {
|
|||
return 0, &Error{err: "message too large"}
|
||||
}
|
||||
|
||||
l := make([]byte, 2)
|
||||
binary.BigEndian.PutUint16(l, uint16(len(m)))
|
||||
|
||||
n, err := (&net.Buffers{l, m}).WriteTo(w.tcp)
|
||||
return int(n), err
|
||||
msg := make([]byte, 2+len(m))
|
||||
binary.BigEndian.PutUint16(msg, uint16(len(m)))
|
||||
copy(msg[2:], m)
|
||||
return w.tcp.Write(msg)
|
||||
default:
|
||||
panic("dns: internal error: udp and tcp both nil")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue