BIND 10 #2000: update libdns++ OPT RDATA so it can handle EDNS options
BIND 10 Development
do-not-reply at isc.org
Mon Feb 17 17:50:15 UTC 2014
#2000: update libdns++ OPT RDATA so it can handle EDNS options
-------------------------------------+-------------------------------------
Reporter: jinmei | Owner: muks
Type: enhancement | Status:
Priority: medium | reviewing
Component: libdns++ | Milestone:
Keywords: | bind10-1.2-release-freeze
Sensitive: 0 | Resolution:
Sub-Project: DNS | CVSS Scoring:
Estimated Difficulty: 4 | Defect Severity: N/A
Total Hours: 0 | Feature Depending on Ticket: NSID
| Add Hours to Ticket: 0
| Internal?: 0
-------------------------------------+-------------------------------------
Changes (by stephen):
* owner: stephen => muks
Comment:
Reviewed commit 916893ac37eeeb169c90c7cf374630a7cfba127b
'''src/lib/dns/rdata/generic/opt_41.h'''
'''src/lib/dns/rdata/generic/opt_41.cc'''
The methods (and attributes) of both OPT and the internal PseudoRR class
need documentation.
The storage of the pseudo-RRs as a vector of shared pointers to PseudoRR
objects seems a bit complicated, since only the getPseudoRRs () method
accesses them. Why not store the PseudoRRs as a vector of bytes? This
would would simplify the construction (which only needs to check that the
lengths in the input buffer indicate that the buffer could represent a set
of PseudoRRs), the toWire() methods (which just write out the buffer as a
set of bytes) and append() method (which just appends the code, length and
data to the current buffer). Only the getPseudoRRs() method need be
altered to split the buffer into a vector of PseudoRR objects, the code of
which is already in the constructor. (Of course, this suggestion depends
on the anticipated usage - if getPseudoRRs() is called more frequently
than anything else, the current approach would reduce overhead.)
'''src/lib/dns/tests/rdata_opt_unittest.cc'''
In the test data (as indicated in rdata_opt_wiredata), I would suggest
making the numeric values of the option code and the length different. If
there is some error in the source code that gets the option's code and
length confused, it won't show up in a test using that data.
'''src/lib/dns/tests/testdata/rdata_opt_fromWire{1,2,3,4}'''
Please start comments with a capital letter.
'''src/lib/dns/tests/testdata/rdata_opt_fromWire{3,4}'''
s/psuedo/pseudo/
'''Other'''
Suggested !ChangeLog entry is OK
--
Ticket URL: <https://bind10.isc.org/ticket/2000#comment:6>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list