diff --git a/go.mod b/go.mod index 1bbf20db8e72ca1d30960ad6936403fdec4bc216..4b499bfc809bc6cddb6488d19bb5b8993740ac70 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.14 require ( git.autistici.org/ai3/go-common v0.0.0-20210118064555-73f00db54723 git.autistici.org/ai3/tools/replds v0.0.0-20210117165138-e6368d266143 - github.com/miekg/dns v1.1.38 + github.com/miekg/dns v1.1.39 github.com/prometheus/client_golang v1.9.0 github.com/prometheus/procfs v0.3.0 // indirect golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad diff --git a/go.sum b/go.sum index 3091d8a2becd3139555c35ddef870a2a366cb330..af6ca560b8a17227d251308a9827ea3481c27be0 100644 --- a/go.sum +++ b/go.sum @@ -201,6 +201,8 @@ github.com/miekg/dns v1.1.37 h1:+kky2ArpBqk0S/74RkwFjmKM9jja7AB1RN7VUuVq0iM= github.com/miekg/dns v1.1.37/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/miekg/dns v1.1.38 h1:MtIY+fmHUVVgv1AXzmKMWcwdCYxTRPG1EDjpqF4RCEw= github.com/miekg/dns v1.1.38/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= +github.com/miekg/dns v1.1.39 h1:6dRfDGnHiXOMmTZkwWANy7bBXXlKls5Qu+pn+Ue0TLo= +github.com/miekg/dns v1.1.39/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/miscreant/miscreant.go v0.0.0-20200214223636-26d376326b75/go.mod h1:pBbZyGwC5i16IBkjVKoy/sznA8jPD/K9iedwe1ESE6w= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= diff --git a/vendor/github.com/miekg/dns/README.md b/vendor/github.com/miekg/dns/README.md index 767eb6bf38380c02e3d80c0cca98866f550692a6..e5a037f03b56c8b813edd59b6141537aa893ade2 100644 --- a/vendor/github.com/miekg/dns/README.md +++ b/vendor/github.com/miekg/dns/README.md @@ -71,6 +71,8 @@ A not-so-up-to-date-list-that-may-be-actually-current: * https://github.com/fortio/dnsping * https://github.com/Luzilla/dnsbl_exporter * https://github.com/bodgit/tsig +* https://github.com/v2fly/v2ray-core (test only) + Send pull request if you want to be listed here. @@ -167,6 +169,8 @@ Example programs can be found in the `github.com/miekg/exdns` repository. * 7873 - Domain Name System (DNS) Cookies * 8080 - EdDSA for DNSSEC * 8499 - DNS Terminology +* 8659 - DNS Certification Authority Authorization (CAA) Resource Record +* 8976 - Message Digest for DNS Zones (ZONEMD RR) ## Loosely Based Upon diff --git a/vendor/github.com/miekg/dns/client.go b/vendor/github.com/miekg/dns/client.go index aa2c49d35e412d5d08eb432962bbd885e3744806..000dc013cf5b34456d69eb34898f0f89bcb7c8b8 100644 --- a/vendor/github.com/miekg/dns/client.go +++ b/vendor/github.com/miekg/dns/client.go @@ -340,11 +340,10 @@ func (co *Conn) Write(p []byte) (int, error) { return co.Conn.Write(p) } - l := make([]byte, 2) - binary.BigEndian.PutUint16(l, uint16(len(p))) - - n, err := (&net.Buffers{l, p}).WriteTo(co.Conn) - return int(n), err + msg := make([]byte, 2+len(p)) + binary.BigEndian.PutUint16(msg, uint16(len(p))) + copy(msg[2:], p) + return co.Conn.Write(msg) } // Return the appropriate timeout for a specific request diff --git a/vendor/github.com/miekg/dns/msg_truncate.go b/vendor/github.com/miekg/dns/msg_truncate.go index 156c5a0e876a6259519389c66473d04b009a71a4..2ddc9a7da88e27b508ffb9480d15c20a4ed8cefb 100644 --- a/vendor/github.com/miekg/dns/msg_truncate.go +++ b/vendor/github.com/miekg/dns/msg_truncate.go @@ -8,6 +8,11 @@ package dns // record adding as many records as possible without exceeding the // requested buffer size. // +// If the message fits within the requested size without compression, +// Truncate will set the message's Compress attribute to false. It is +// the caller's responsibility to set it back to true if they wish to +// compress the payload regardless of size. +// // The TC bit will be set if any records were excluded from the message. // If the TC bit is already set on the message it will be retained. // TC indicates that the client should retry over TCP. diff --git a/vendor/github.com/miekg/dns/server.go b/vendor/github.com/miekg/dns/server.go index 30dfd41def49c454d47752020bab32716678aba5..eec02ef9b7a7f837f9b7b3c1e4fa59b08975c3d8 100644 --- a/vendor/github.com/miekg/dns/server.go +++ b/vendor/github.com/miekg/dns/server.go @@ -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") } diff --git a/vendor/github.com/miekg/dns/version.go b/vendor/github.com/miekg/dns/version.go index dc80a8264f4e70985063dd18b0784344c4cbc457..4c33f0a5f4dab5eb6eb86c57d6ecc316559d0d47 100644 --- a/vendor/github.com/miekg/dns/version.go +++ b/vendor/github.com/miekg/dns/version.go @@ -3,7 +3,7 @@ package dns import "fmt" // Version is current version of this library. -var Version = v{1, 1, 38} +var Version = v{1, 1, 39} // v holds the version of this library. type v struct { diff --git a/vendor/modules.txt b/vendor/modules.txt index e2a1228d9da0e56a1f19c99dddd7849d9a8810e3..04bf0e15ef7d4794d8ecec0a387eda42e34033b2 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -31,7 +31,7 @@ github.com/golang/protobuf/ptypes/timestamp github.com/gorilla/handlers # github.com/matttproud/golang_protobuf_extensions v1.0.1 github.com/matttproud/golang_protobuf_extensions/pbutil -# github.com/miekg/dns v1.1.38 +# github.com/miekg/dns v1.1.39 ## explicit github.com/miekg/dns # github.com/openzipkin/zipkin-go v0.2.5