BIND 10 #1708: Integrate DHCP6 process startup into BIND 10
BIND 10 Development
do-not-reply at isc.org
Mon Jul 2 11:09:28 UTC 2012
#1708: Integrate DHCP6 process startup into BIND 10
-------------------------------------+-------------------------------------
Reporter: tomek | Owner: tomek
Type: | Status: reviewing
enhancement | Milestone: Sprint-
Priority: | DHCP-20120703
medium | Resolution:
Component: dhcp6 | Sensitive: 0
Keywords: | Sub-Project: DHCP
Defect Severity: N/A | Estimated Difficulty: 0
Feature Depending on Ticket: | Total Hours: 0
Add Hours to Ticket: 0 |
Internal?: 0 |
-------------------------------------+-------------------------------------
Changes (by stephen):
* owner: stephen => tomek
Comment:
Reviewed commit f788c425a50d504d7d23d3945b67f2ad25513495
'''src/bin/dhcp4/main.cc'''[[BR]]
main(): Why does the ControlledDhcp4Srv have to be created via "new"? It
can be created as an automatic object, which removes the need to delete
the server when run() returns.
Suggest boost::lexical_cast be used to interpret the port number - the
current use of strtol with a null value for endptr will not catch all
invalid values.
'''src/bin/dhcp6/dhcp6_srv.cc'''[[BR]]
Constructor: IFaceMgr::instance() is called and if there is a failure, the
shutdown_ variable is set and an error is logged. Why is the condition
then ignored (the code immediately goes on to call countIfaces() on the
created instance). And if there are no interfaces, another error is
recorded, shutdown_ is set, yet the error is ignored and the code attempts
to open sockets. Why are the errors ignored?
'''src/bin/dhcp6/ctrl_dhcp6_srv.cc'''[[BR]]
Note: This code is very similar to that in src/bin/dhcp6/ctrl_dhcp4_srv.cc
(from ticket #1651).
'''src/bin/dhcp6/main.cc'''[[BR]]
main(): Why does the software start up a ControlledDhcpv6Srv object then,
after run() returns and the server is deleted, start up a Dhcp6Srv object?
main(): Why does the ControlledDhcp4Srv have to be created via "new"? It
can be created as an automatic object, which removes the need to delete
the server when run() returns.
Suggest boost::lexical_cast be used to interpret the port number - the
current use of strtol with a null value for endptr will not catch all
invalid values.
dhcp6 and dhcp4 main() are practically identical. As they depend on a
type (the type of the server), they could be combined into a single
templated function.
'''Overall'''[[BR]]
I suggest we open a new ticket to refactor the common control code in
dhcp4 and dhcp6 into a single set of functions/classes (and tests).
--
Ticket URL: <http://bind10.isc.org/ticket/1708#comment:6>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list