BIND 10 #2522: support generic version of rdata::createRdata(text) in RP, MINFO, TSIG RDATA
BIND 10 Development
do-not-reply at isc.org
Sat May 18 03:34:56 UTC 2013
#2522: support generic version of rdata::createRdata(text) in RP, MINFO, TSIG
RDATA
-------------------------------------+-------------------------------------
Reporter: jinmei | Owner:
Type: task | pselkirk
Priority: medium | Status:
Component: libdns++ | reviewing
Keywords: | Milestone:
Sensitive: 0 | Sprint-20130528
Sub-Project: DNS | Resolution:
Estimated Difficulty: 5 | CVSS Scoring:
Total Hours: 0 | Defect Severity: N/A
| Feature Depending on Ticket:
| loadzone-ng
| Add Hours to Ticket: 0
| Internal?: 0
-------------------------------------+-------------------------------------
Comment (by pselkirk):
Replying to [comment:16 jinmei]:
> '''tsig_250.cc'''
> - why do we use uint32_t and perform range check explicitly?
>
> can't lexical_cast reject integral values > 0xffff? with uint16_t?
Here is the unittest trace with `lexical_cast<uint16_t>`:
{{{
[ RUN ] Rdata_TSIG_Test.badText
../../../../src/lib/dns/tests/rdata_unittest.h:63: Failure
Expected: RdataType rdata(rdata_txt) throws an exception of type
ExForString.
Actual: it throws nothing.
Google Test trace:
../../../../src/lib/dns/tests/rdata_unittest.h:60: foo 0 0 0 0 -1 0
../../../../src/lib/dns/tests/rdata_unittest.h:73: Failure
Expected: RdataType rdata(lexer, origin, MasterLoader::DEFAULT, loader_cb)
throws an exception of type ExForLexer.
Actual: it throws nothing.
Google Test trace:
../../../../src/lib/dns/tests/rdata_unittest.h:60: foo 0 0 0 0 -1 0
[ FAILED ] Rdata_TSIG_Test.badText (2 ms)
}}}
It appears that it casts -1 to 0xffff, which is a perfectly logical thing
for it to do, but not actually what we want it to do.
--
Ticket URL: <http://bind10.isc.org/ticket/2522#comment:18>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list