]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1405] fixed compilation
authorRazvan Becheriu <razvan@isc.org>
Thu, 15 Oct 2020 10:21:45 +0000 (13:21 +0300)
committerRazvan Becheriu <razvan@isc.org>
Wed, 18 Nov 2020 13:55:22 +0000 (15:55 +0200)
src/lib/dhcpsrv/network.cc
src/lib/dhcpsrv/network.h

index b7ba2ba0cd24cd90ddba0510f9f9847d1d19da9c..51e5784f3bf68b75f345cf302657d4264d6e9f09 100644 (file)
@@ -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)) {
index 857bab6c91c0c91061c0b56506a897c6e3d6346e..2bc9ec8f347733991500514d65b8a691b329c516 100644 (file)
@@ -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;