mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-30 05:27:55 +00:00
[#1405] do not set reservation mode if not explicitly specified
This commit is contained in:
parent
378451e9b0
commit
e65f8627f9
@ -232,17 +232,17 @@ BaseNetworkParser::parseHostReservationMode(const data::ConstElementPtr& network
|
||||
void
|
||||
BaseNetworkParser::parseHostReservationModes(const data::ConstElementPtr& network_data,
|
||||
NetworkPtr& network) {
|
||||
bool found = false;
|
||||
if (network_data->contains("reservations-out-of-pool")) {
|
||||
found = true;
|
||||
}
|
||||
if (network_data->contains("reservations-in-subnet")) {
|
||||
found = true;
|
||||
}
|
||||
if (network_data->contains("reservations-global")) {
|
||||
found = true;
|
||||
}
|
||||
if (network_data->contains("reservation-mode")) {
|
||||
bool found = false;
|
||||
if (network_data->contains("reservations-out-of-pool")) {
|
||||
found = true;
|
||||
}
|
||||
if (network_data->contains("reservations-in-subnet")) {
|
||||
found = true;
|
||||
}
|
||||
if (network_data->contains("reservations-global")) {
|
||||
found = true;
|
||||
}
|
||||
if (found) {
|
||||
isc_throw(DhcpConfigError, "invalid use of both 'reservation-mode'"
|
||||
" and one of 'reservations-out-of-pool'"
|
||||
@ -250,6 +250,9 @@ BaseNetworkParser::parseHostReservationModes(const data::ConstElementPtr& networ
|
||||
" 'reservations-global' parameters");
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
HostReservationModesParser parser;
|
||||
Network::HRMode flags = parser.parse(network_data);
|
||||
|
Loading…
x
Reference in New Issue
Block a user