BIND 10 #116: review: NSEC RDATA "from wire" fixes and tests
BIND 10 Development
do-not-reply at isc.org
Thu May 20 05:19:23 UTC 2010
#116: review: NSEC RDATA "from wire" fixes and tests
---------------------------+------------------------------------------------
Reporter: jinmei | Owner: jinmei
Type: defect | Status: assigned
Priority: critical | Milestone: 03. 1st Incremental Release
Component: DNSPacket API | Resolution:
Keywords: | Sensitive: 0
---------------------------+------------------------------------------------
Changes (by shane):
* owner: each => jinmei
Comment:
I decided I would go ahead and have a look at this. I'm not sure if this
code has already been merged or not, but I figured it couldn't hurt to
review it. I'm certainly not the best person for this, but I'll have a
look.
Typo here:
116 isc_throw(DNSMessageFORMERR, "NSEC RDATA from wire:
"
117 "incomplete bit map filed");
Should be "field".
A question about the new tests. One is this:
81 // Bitmap length is 0, which is invalid.
82 EXPECT_THROW(rdataFactoryFromFile(RRType::NSEC(),
RRClass::IN(),
83
"testdata/rdata_nsec_fromWire6"),
84 DNSMessageFORMERR);
However in toText() we see this:
assert(len >= 0 && len <= 32);
If the length cannot be 0, then the assertion should be:
assert(len > 0 && len <= 32);
Further, do we consider it good practice to use assert()? Will this raise
an exception or simply end the program?
Hopefully this is useful. :)
--
Ticket URL: <https://bind10.isc.org/ticket/116#comment:3>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list