Commit 48e65668 authored by Sebastian Schrader's avatar Sebastian Schrader Committed by Tomek Mrugalski
Browse files

[5184] Check shared-network setting consistency

parent f27a128d
......@@ -191,6 +191,7 @@ public:
// Let's check if all subnets have either the same interface
// or don't have the interface specified at all.
string iface = (*net)->getIface();
bool authoritative = (*net)->getAuthoritative();
const Subnet4Collection* subnets = (*net)->getAllSubnets();
if (subnets) {
......@@ -212,6 +213,12 @@ public:
<< " or the shared-network itself used " << iface);
}
if (authoritative != (*subnet)->getAuthoritative()) {
isc_throw(DhcpConfigError, "Subnet " << (*subnet)->toText()
<< " has different authoritative setting " << (*subnet)->getAuthoritative()
<< " than the shared-network itself: " << authoritative);
}
// Let's collect the subnets in case we later find out the
// subnet doesn't have a mandatory name.
txt += (*subnet)->toText() + " ";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment