[bind10-dev] MessageTooShort and SERVFAIL

JINMEI Tatuya / 神明達哉 jinmei at isc.org
Thu Nov 8 22:51:54 UTC 2012


At Thu, 08 Nov 2012 21:08:20 +0000,
Francis Dupont <fdupont at isc.org> wrote:

> PS: an example of  offending code is in src/bin/auth/auth_srv.cc:
[...]
> note that MessageTooShort derives from Exception, not from DNSProtocolError.

But this code is placed after the header check, and that's
intentional.  As long as parseHeader() has been called, fromWire()
should never throw MessageTooShort.

Actually, though, some other wire-format errors (such as short length)
can result in an exception that's not derived from DNSProtocolError,
which would result in SERVFAIL.  For them, I agree it should actually
be FORMERR (and that's been in my secret TODO list for quite some
time), but it's difficult to reach this point from your original
message and subject:-)

---
JINMEI, Tatuya


More information about the bind10-dev mailing list