extern const isc::log::MessageID DHCPSRV_TIMERMGR_UNREGISTER_TIMER = "DHCPSRV_TIMERMGR_UNREGISTER_TIMER";
extern const isc::log::MessageID DHCPSRV_UNEXPECTED_NAME = "DHCPSRV_UNEXPECTED_NAME";
extern const isc::log::MessageID DHCPSRV_UNKNOWN_DB = "DHCPSRV_UNKNOWN_DB";
+extern const isc::log::MessageID DHCPSRV_UNNUMBERED_CONFIGURED_SUBNET = "DHCPSRV_UNNUMBERED_CONFIGURED_SUBNET";
} // namespace dhcp
} // namespace isc
"DHCPSRV_TIMERMGR_UNREGISTER_TIMER", "unregistering timer: %1",
"DHCPSRV_UNEXPECTED_NAME", "database access parameters passed through '%1', expected 'lease-database'",
"DHCPSRV_UNKNOWN_DB", "unknown database type: %1",
+ "DHCPSRV_UNNUMBERED_CONFIGURED_SUBNET", "a subnet was configured unnumbered: %1",
NULL
};
extern const isc::log::MessageID DHCPSRV_TIMERMGR_UNREGISTER_TIMER;
extern const isc::log::MessageID DHCPSRV_UNEXPECTED_NAME;
extern const isc::log::MessageID DHCPSRV_UNKNOWN_DB;
+extern const isc::log::MessageID DHCPSRV_UNNUMBERED_CONFIGURED_SUBNET;
} // namespace dhcp
} // namespace isc
% DHCPSRV_UNKNOWN_DB unknown database type: %1
The database access string specified a database type (given in the
message) that is unknown to the software. This is a configuration error.
+
+% DHCPSRV_UNNUMBERED_CONFIGURED_SUBNET a subnet was configured unnumbered: %1
+A warning message issued when a subnet was configured with a zero or without
+an id. The prefix of the subnet is displayed.
#include <asiolink/io_address.h>
#include <asiolink/addr_utilities.h>
#include <dhcp/option_space.h>
+#include <dhcpsrv/dhcpsrv_log.h>
#include <dhcpsrv/flq_allocation_state.h>
#include <dhcpsrv/flq_allocator.h>
#include <dhcpsrv/iterative_allocation_state.h>
: id_(id == 0 ? generateNextID() : id), prefix_(prefix),
prefix_len_(len),
shared_network_name_() {
+ if ((id == 0) && (id_ == 1)) {
+ // Emit a warning on the first auto-numbered subnet.
+ LOG_WARN(dhcpsrv_logger, DHCPSRV_UNNUMBERED_CONFIGURED_SUBNET)
+ .arg(toText());
+ }
if ((prefix.isV6() && len > 128) ||
(prefix.isV4() && len > 32)) {
isc_throw(BadValue,