mirror of
https://github.com/mjl-/mox.git
synced 2025-07-10 05:54:38 +03:00
update to latest adns with fix for endless loop for incoming corrupt packets
This commit is contained in:
8
vendor/github.com/mjl-/adns/dnsclient_unix.go
generated
vendored
8
vendor/github.com/mjl-/adns/dnsclient_unix.go
generated
vendored
@ -262,7 +262,9 @@ func checkHeader(p *dnsmessage.Parser, h dnsmessage.Header) error {
|
||||
return errServerTemporarilyMisbehaving
|
||||
}
|
||||
if rh.Type != dnsmessage.TypeOPT {
|
||||
p.SkipAdditional()
|
||||
if err := p.SkipAdditional(); err != nil {
|
||||
return errInvalidDNSResponse
|
||||
}
|
||||
continue
|
||||
}
|
||||
// Only one OPT record is allowed. With multiple we MUST return an error. See RFC
|
||||
@ -328,7 +330,9 @@ func extractExtendedRCode(p dnsmessage.Parser, hdr dnsmessage.Header) (dnsmessag
|
||||
if ahdr.Type == dnsmessage.TypeOPT {
|
||||
return ahdr.ExtendedRCode(hdr.RCode), hasAdd
|
||||
}
|
||||
p.SkipAdditional()
|
||||
if err := p.SkipAdditional(); err != nil {
|
||||
return hdr.RCode, hasAdd
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user