From: Razvan Becheriu Date: Thu, 15 Oct 2020 10:21:45 +0000 (+0300) Subject: [#1405] fixed compilation X-Git-Tag: Kea-1.9.2~131 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb12e14fb38a7dfc3eeaf367bf9a2075ba01073a;p=thirdparty%2Fkea.git [#1405] fixed compilation --- diff --git a/src/lib/dhcpsrv/network.cc b/src/lib/dhcpsrv/network.cc index b7ba2ba0cd..51e5784f3b 100644 --- a/src/lib/dhcpsrv/network.cc +++ b/src/lib/dhcpsrv/network.cc @@ -19,6 +19,12 @@ using namespace isc::util; namespace isc { namespace dhcp { +const uint8_t Network::HR_DISABLED = 0; +const uint8_t Network::HR_OUT_OF_POOL = 1 << 0; +const uint8_t Network::HR_IN_SUBNET = 1 << 1; +const uint8_t Network::HR_GLOBAL = 1 << 2; +const uint8_t Network::HR_ALL = Network::HR_IN_SUBNET | Network::HR_OUT_OF_POOL; + void Network::RelayInfo::addAddress(const asiolink::IOAddress& addr) { if (containsAddress(addr)) { diff --git a/src/lib/dhcpsrv/network.h b/src/lib/dhcpsrv/network.h index 857bab6c91..2bc9ec8f34 100644 --- a/src/lib/dhcpsrv/network.h +++ b/src/lib/dhcpsrv/network.h @@ -157,28 +157,28 @@ public: /// /// None - host reservation is disabled. No reservation types /// are allowed. - const uint8_t HR_DISABLED = 0; + static const uint8_t HR_DISABLED; /// Only out-of-pool reservations is allowed. This mode /// allows AllocEngine to skip reservation checks when /// dealing with with addresses that are in pool. /// When HR_IN_SUBNET is set, this is always enabled as well. - const uint8_t HR_OUT_OF_POOL = 1 << 0; + static const uint8_t HR_OUT_OF_POOL; /// The in-pool reservations is allowed. This mode actually /// behaves as if out-of-pool reservations are active as well. - const uint8_t HR_IN_SUBNET = 1 << 1; + static const uint8_t HR_IN_SUBNET; /// Only global reservations are allowed. This mode /// instructs AllocEngine to only look at global reservations. - const uint8_t HR_GLOBAL = 1 << 2; + static const uint8_t HR_GLOBAL; /// Both out-of-pool and in-pool reservations are allowed. This is the /// most flexible mode, where sysadmin have biggest liberty. However, /// there is a non-trivial performance penalty for it, as the /// AllocEngine code has to check whether there are reservations, even /// when dealing with reservations from within the dynamic pools. - const uint8_t HR_ALL = HR_IN_SUBNET | HR_OUT_OF_POOL; + static const uint8_t HR_ALL; /// @brief Bitset used to store @ref HRModeFlag flags. typedef uint8_t HRMode;