mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-01 14:35:29 +00:00
[#2866] Checkpoint
This commit is contained in:
committed by
Marcin Siodelski
parent
823da39a90
commit
2b169683fe
@@ -279,6 +279,7 @@ extern const isc::log::MessageID DHCPSRV_TIMERMGR_UNREGISTER_ALL_TIMERS = "DHCPS
|
|||||||
extern const isc::log::MessageID DHCPSRV_TIMERMGR_UNREGISTER_TIMER = "DHCPSRV_TIMERMGR_UNREGISTER_TIMER";
|
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_UNEXPECTED_NAME = "DHCPSRV_UNEXPECTED_NAME";
|
||||||
extern const isc::log::MessageID DHCPSRV_UNKNOWN_DB = "DHCPSRV_UNKNOWN_DB";
|
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 dhcp
|
||||||
} // namespace isc
|
} // namespace isc
|
||||||
@@ -558,6 +559,7 @@ const char* values[] = {
|
|||||||
"DHCPSRV_TIMERMGR_UNREGISTER_TIMER", "unregistering timer: %1",
|
"DHCPSRV_TIMERMGR_UNREGISTER_TIMER", "unregistering timer: %1",
|
||||||
"DHCPSRV_UNEXPECTED_NAME", "database access parameters passed through '%1', expected 'lease-database'",
|
"DHCPSRV_UNEXPECTED_NAME", "database access parameters passed through '%1', expected 'lease-database'",
|
||||||
"DHCPSRV_UNKNOWN_DB", "unknown database type: %1",
|
"DHCPSRV_UNKNOWN_DB", "unknown database type: %1",
|
||||||
|
"DHCPSRV_UNNUMBERED_CONFIGURED_SUBNET", "a subnet was configured unnumbered: %1",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -280,6 +280,7 @@ extern const isc::log::MessageID DHCPSRV_TIMERMGR_UNREGISTER_ALL_TIMERS;
|
|||||||
extern const isc::log::MessageID DHCPSRV_TIMERMGR_UNREGISTER_TIMER;
|
extern const isc::log::MessageID DHCPSRV_TIMERMGR_UNREGISTER_TIMER;
|
||||||
extern const isc::log::MessageID DHCPSRV_UNEXPECTED_NAME;
|
extern const isc::log::MessageID DHCPSRV_UNEXPECTED_NAME;
|
||||||
extern const isc::log::MessageID DHCPSRV_UNKNOWN_DB;
|
extern const isc::log::MessageID DHCPSRV_UNKNOWN_DB;
|
||||||
|
extern const isc::log::MessageID DHCPSRV_UNNUMBERED_CONFIGURED_SUBNET;
|
||||||
|
|
||||||
} // namespace dhcp
|
} // namespace dhcp
|
||||||
} // namespace isc
|
} // namespace isc
|
||||||
|
@@ -1392,3 +1392,7 @@ indicate an error in the source code, please submit a bug report.
|
|||||||
% DHCPSRV_UNKNOWN_DB unknown database type: %1
|
% DHCPSRV_UNKNOWN_DB unknown database type: %1
|
||||||
The database access string specified a database type (given in the
|
The database access string specified a database type (given in the
|
||||||
message) that is unknown to the software. This is a configuration error.
|
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.
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
#include <asiolink/io_address.h>
|
#include <asiolink/io_address.h>
|
||||||
#include <asiolink/addr_utilities.h>
|
#include <asiolink/addr_utilities.h>
|
||||||
#include <dhcp/option_space.h>
|
#include <dhcp/option_space.h>
|
||||||
|
#include <dhcpsrv/dhcpsrv_log.h>
|
||||||
#include <dhcpsrv/flq_allocation_state.h>
|
#include <dhcpsrv/flq_allocation_state.h>
|
||||||
#include <dhcpsrv/flq_allocator.h>
|
#include <dhcpsrv/flq_allocator.h>
|
||||||
#include <dhcpsrv/iterative_allocation_state.h>
|
#include <dhcpsrv/iterative_allocation_state.h>
|
||||||
@@ -72,6 +73,11 @@ Subnet::Subnet(const isc::asiolink::IOAddress& prefix, uint8_t len,
|
|||||||
: id_(id == 0 ? generateNextID() : id), prefix_(prefix),
|
: id_(id == 0 ? generateNextID() : id), prefix_(prefix),
|
||||||
prefix_len_(len),
|
prefix_len_(len),
|
||||||
shared_network_name_() {
|
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) ||
|
if ((prefix.isV6() && len > 128) ||
|
||||||
(prefix.isV4() && len > 32)) {
|
(prefix.isV4() && len > 32)) {
|
||||||
isc_throw(BadValue,
|
isc_throw(BadValue,
|
||||||
|
Reference in New Issue
Block a user