Commit 68b2cb03 authored by Thomas Markwalder's avatar Thomas Markwalder
Browse files

[#686,!403] Addressed review comments

     Fixed cosmetics. Spacing etc...
parent fc9307ae
......@@ -166,8 +166,8 @@ const SimpleDefaults SimpleParser4::IFACE4_DEFAULTS = {
/// @brief This table defines default values for dhcp-queue-control in DHCPv4.
const SimpleDefaults SimpleParser4::DHCP_QUEUE_CONTROL4_DEFAULTS = {
{ "enable-queue", Element::boolean, "false"},
{ "queue-type", Element::string, "kea-ring4"},
{ "capacity", Element::integer, "500"}
{ "queue-type", Element::string, "kea-ring4"},
{ "capacity", Element::integer, "500"}
};
/// @brief This defines default values for sanity checking for DHCPv4.
......
......@@ -149,8 +149,8 @@ const SimpleDefaults SimpleParser6::IFACE6_DEFAULTS = {
/// @brief This table defines default values for dhcp-queue-control in DHCPv4.
const SimpleDefaults SimpleParser6::DHCP_QUEUE_CONTROL6_DEFAULTS = {
{ "enable-queue", Element::boolean, "false"},
{ "queue-type", Element::string, "kea-ring6"},
{ "capacity", Element::integer, "500"}
{ "queue-type", Element::string, "kea-ring6"},
{ "capacity", Element::integer, "500"}
};
/// @brief This defines default values for sanity checking for DHCPv6.
......
......@@ -94,9 +94,6 @@ void SanityChecker::checkLeaseInternal(LeasePtrType& lease, const CfgConsistency
}
switch (checks->getLeaseSanityCheck()) {
case CfgConsistency::LEASE_CHECK_NONE:
// No checks whatsoever, just return the lease as-is.
break;
case CfgConsistency::LEASE_CHECK_WARN:
if (lease->subnet_id_ != id) {
// Print a warning, but return the lease as is.
......@@ -149,6 +146,7 @@ void SanityChecker::checkLeaseInternal(LeasePtrType& lease, const CfgConsistency
}
break;
case CfgConsistency::LEASE_CHECK_DEL:
if (lease->subnet_id_ != id) {
LOG_INFO(dhcpsrv_logger, DHCPSRV_LEASE_SANITY_FAIL_DISCARD)
......@@ -158,6 +156,13 @@ void SanityChecker::checkLeaseInternal(LeasePtrType& lease, const CfgConsistency
lease.reset();
}
break;
default:
// Shouldn't get here but some compilers and analyzers
// complain. We'll we treat it as NONE and return the
// lease as-is.
break;
}
// Additional checks may be implemented in the future here.
......
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