BIND 10 #2596: Tie DHCP V6 server subnet to interface
BIND 10 Development
do-not-reply at isc.org
Fri Jan 18 09:53:02 UTC 2013
#2596: Tie DHCP V6 server subnet to interface
-------------------------------------+-------------------------------------
Reporter: stephen | Owner: tomek
Type: enhancement | Status:
Priority: medium | reviewing
Component: dhcp | Milestone:
Keywords: | Sprint-DHCP-20130122
Sensitive: 0 | Resolution:
Sub-Project: DHCP | CVSS Scoring:
Estimated Difficulty: 0 | Defect Severity: N/A
Total Hours: 0 | Feature Depending on Ticket:
| Add Hours to Ticket: 0
| Internal?: 0
-------------------------------------+-------------------------------------
Changes (by marcin):
* owner: marcin => tomek
Comment:
Replying to [comment:5 tomek]:
Reviewed commit f3709cc11e26e2bb2a0cfa4f447efce885160276
> Replying to [comment:4 marcin]:
> > Line 1165: if the interface name is specified then it is set for a
particular subnet being configured:
> > {{{
> > subnet_->setIface(iface);
> > }}}
> > The modifier function does not validate the iface. In particular a
user may be interested if the interface exists (in case he mistype it).
IMO, the configuration parser should report an error at this point if the
interface is wrong. Otherwise he is going to go through the configuration
commit successfully and then will get cryptic errors or will not get any
error at all but the server will misbehave.
> Ok. Implemented validation. Also modified the test to pass on systems
that do not have eth0 interface.
'''src/bin/dhcp6/tests/config_parser_unittest.cc'''
Although it is unlikely, it is possible that someone has named his or her
interface nonexisting0. If so, the ''subnetInterfaceBugus'' test will fail
saying that the configuration was successful while expected failure. It is
ok, that the test fails but it could actually provide some better
information on failure if it was sanity checked that the bogus interface
actually exists. So for example, the test could:
{{{
ASSERT_TRUE(IfaceMgr::instance().getIface(bogus_iface_).empty())
<< "The '" << bogus_interface_ << "' exists on this system"
<< " while the test assumes that it doesn't to execute some negative"
<< " testing scenario. Can't continue this test";
}}}
The test fails anyway but it may give some more insight into the failure
reason.
What do you think?
--
Ticket URL: <http://bind10.isc.org/ticket/2596#comment:6>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list