[bind10-dev] MessageTooShort and SERVFAIL
JINMEI Tatuya / 神明達哉
jinmei at isc.org
Thu Nov 8 19:16:45 UTC 2012
At Wed, 07 Nov 2012 14:44:27 +0000,
Francis Dupont <fdupont at isc.org> wrote:
> On a request shorter than a DNS message header, Message::fromWire
> raises the MessageTooShort exception which is translated (as it is
> not a DNSProtocolError) into a SERVFAIL response. IMHO it should
> be more a FORMERR (as bind 9 does)?
Did you confirm the behavior by actually seeing the response in the
wire, or is it based on code inspection? I believe in this case it
results in silent discard:
// First, check the header part. If we fail even for the base header,
// just drop the message.
try {
message.parseHeader(request_buffer);
...
} catch (const Exception& ex) {
LOG_DEBUG(auth_logger, DBG_AUTH_DETAIL, AUTH_HEADER_PARSE_FAIL)
.arg(ex.what());
impl_->resumeServer(server, message, stats_attrs, false);
return;
}
And, in fact, whether it's SERVFAIL or FORMERR, it wouldn't even make
sense to try sending any response if it doesn't even have a complete
header.
---
JINMEI, Tatuya
More information about the bind10-dev
mailing list