]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[492-cb-subnet-merge-vs-duplicate-subnet-prefixes] Added comments about corner cases...
authorFrancis Dupont <fdupont@isc.org>
Sat, 2 Mar 2019 19:22:07 +0000 (20:22 +0100)
committerMarcin Siodelski <marcin@isc.org>
Fri, 24 May 2019 16:30:00 +0000 (12:30 -0400)
src/lib/dhcpsrv/cfg_subnets4.cc

index 1eb24fe70dbb21ae9efc5d29d36405e923767226..957a2c33e90d7a119f1f53d06a3e8ddbf31dcf7d 100644 (file)
@@ -111,6 +111,10 @@ CfgSubnets4::merge(CfgOptionDefPtr cfg_def, CfgSharedNetworks4Ptr networks,
                 continue;
             }
 
+            // Updating the prefix can lead to problems... e.g. pools
+            // and reservations going outside range.
+            // @todo: check prefix change.
+
             // We're going to replace the existing subnet with the other
             // version. If it belongs to a shared network, we need
             // remove it from that network.
@@ -131,11 +135,9 @@ CfgSubnets4::merge(CfgOptionDefPtr cfg_def, CfgSharedNetworks4Ptr networks,
             // Subnet found.
             auto existing_subnet = *subnet_prefix_it;
 
-            // If the existing subnet and other subnet
-            // are the same instance skip it.
-            if (existing_subnet == *other_subnet) {
-                continue;
-            }
+            // Updating the id can lead to problems... e.g. reservation
+            // for the previous subnet ID.
+            // @todo: check reservations
 
             // We're going to replace the existing subnet with the other
             // version. If it belongs to a shared network, we need