Merge branch 'master' of github.com:miekg/dns
This commit is contained in:
commit
8f334b52a0
|
@ -176,6 +176,7 @@ func TestIsDomainName(t *testing.T) {
|
||||||
"..": &ret{false, 1},
|
"..": &ret{false, 1},
|
||||||
"@.": &ret{true, 1},
|
"@.": &ret{true, 1},
|
||||||
"www.example.com": &ret{true, 3},
|
"www.example.com": &ret{true, 3},
|
||||||
|
"www.e%ample.com": &ret{true, 3},
|
||||||
"www.example.com.": &ret{true, 3},
|
"www.example.com.": &ret{true, 3},
|
||||||
"mi\\k.nl.": &ret{true, 2},
|
"mi\\k.nl.": &ret{true, 2},
|
||||||
"mi\\k.nl": &ret{true, 2},
|
"mi\\k.nl": &ret{true, 2},
|
||||||
|
|
6
msg.go
6
msg.go
|
@ -1440,9 +1440,9 @@ func (dns *Msg) Unpack(msg []byte) (err error) {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If we have seen a TC bit being set, we return here, without
|
// If we see a TC bit being set we return here, without
|
||||||
// an error, because technically it isn't an error. So we return
|
// an error, because technically it isn't an error. So return
|
||||||
// without parsing, the potentially corrupt packet.
|
// without parsing the potentially corrupt packet and hitting an error.
|
||||||
if dns.Truncated {
|
if dns.Truncated {
|
||||||
dns.Answer = nil
|
dns.Answer = nil
|
||||||
dns.Ns = nil
|
dns.Ns = nil
|
||||||
|
|
Loading…
Reference in New Issue