diff --git a/labels_test.go b/labels_test.go index bcad98e6..b4cd0018 100644 --- a/labels_test.go +++ b/labels_test.go @@ -176,6 +176,7 @@ func TestIsDomainName(t *testing.T) { "..": &ret{false, 1}, "@.": &ret{true, 1}, "www.example.com": &ret{true, 3}, + "www.e%ample.com": &ret{true, 3}, "www.example.com.": &ret{true, 3}, "mi\\k.nl.": &ret{true, 2}, "mi\\k.nl": &ret{true, 2}, diff --git a/msg.go b/msg.go index ab2a4a0c..4636b921 100644 --- a/msg.go +++ b/msg.go @@ -1440,9 +1440,9 @@ func (dns *Msg) Unpack(msg []byte) (err error) { return err } } - // If we have seen a TC bit being set, we return here, without - // an error, because technically it isn't an error. So we return - // without parsing, the potentially corrupt packet. + // If we see a TC bit being set we return here, without + // an error, because technically it isn't an error. So return + // without parsing the potentially corrupt packet and hitting an error. if dns.Truncated { dns.Answer = nil dns.Ns = nil