diff options
author | Razvan Becheriu <razvan@isc.org> | 2020-10-09 17:39:58 +0200 |
---|---|---|
committer | Razvan Becheriu <razvan@isc.org> | 2020-11-18 14:55:22 +0100 |
commit | 234296cbced0cf521f971eb078a12f48ab2c369b (patch) | |
tree | b9c8f8d24ffd30f1974bd43e8b7311761c83fe79 /src/lib/dhcpsrv/network.h | |
parent | [#1405] inherit reservation modes from global level (diff) | |
download | kea-234296cbced0cf521f971eb078a12f48ab2c369b.tar.xz kea-234296cbced0cf521f971eb078a12f48ab2c369b.zip |
[#1405] updated unittests
Diffstat (limited to 'src/lib/dhcpsrv/network.h')
-rw-r--r-- | src/lib/dhcpsrv/network.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/lib/dhcpsrv/network.h b/src/lib/dhcpsrv/network.h index 95cb0465a1..75046175c4 100644 --- a/src/lib/dhcpsrv/network.h +++ b/src/lib/dhcpsrv/network.h @@ -451,19 +451,25 @@ public: util::Optional<bool> hr_mode_global; getGlobalProperty(hr_mode_global, "reservation-modes.global"); if (!hr_mode_global.unspecified()) { - flags |= Network::HR_GLOBAL; + if (hr_mode_global.get()) { + flags |= Network::HR_GLOBAL; + } found = true; } util::Optional<bool> hr_mode_in_subnet; getGlobalProperty(hr_mode_in_subnet, "reservation-modes.in-subnet"); if (!hr_mode_in_subnet.unspecified()) { - flags |= Network::HR_IN_SUBNET; + if (hr_mode_in_subnet.get()) { + flags |= Network::HR_IN_SUBNET; + } found = true; } util::Optional<bool> hr_mode_out_of_pool; getGlobalProperty(hr_mode_out_of_pool, "reservation-modes.out-of-pool"); if (!hr_mode_out_of_pool.unspecified()) { - flags |= Network::HR_OUT_OF_POOL; + if (hr_mode_out_of_pool.get()) { + flags |= Network::HR_OUT_OF_POOL; + } found = true; } if (found) { |