]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#4368] Final improvements
authorFrancis Dupont <fdupont@isc.org>
Mon, 4 May 2026 09:42:06 +0000 (11:42 +0200)
committerFrancis Dupont <fdupont@isc.org>
Thu, 7 May 2026 14:13:01 +0000 (16:13 +0200)
src/bin/dhcp4/tests/config_parser_unittest.cc
src/hooks/dhcp/mysql/mysql_lease_mgr.cc
src/hooks/dhcp/pgsql/pgsql_lease_mgr.cc
src/lib/dhcp/tests/option6_ia_unittest.cc

index af9d3e5f16de1c378ac9dd73ac11bc5778251c1d..7000e58e9754f4018496fce538de858fc6024c67 100644 (file)
@@ -2296,8 +2296,7 @@ TEST_F(Dhcp4ParserTest, multiplePools) {
               pools1[0]->toText());
     EXPECT_EQ("type=V4, 192.0.2.200-192.0.2.255",
               pools1[1]->toText());
-    // There shouldn't be any TA or PD pools
-    EXPECT_THROW((*subnet)->getPools(Lease::TYPE_TA), BadValue);
+    // There shouldn't be any PD pools
     EXPECT_THROW((*subnet)->getPools(Lease::TYPE_PD), BadValue);
 
     // Check the second subnet
@@ -2308,8 +2307,7 @@ TEST_F(Dhcp4ParserTest, multiplePools) {
               pools2[0]->toText());
     EXPECT_EQ("type=V4, 192.0.3.128-192.0.3.255",
               pools2[1]->toText());
-    // There shouldn't be any TA or PD pools
-    EXPECT_THROW((*subnet)->getPools(Lease::TYPE_TA), BadValue);
+    // There shouldn't be any PD pools
     EXPECT_THROW((*subnet)->getPools(Lease::TYPE_PD), BadValue);
 }
 
index 1dea5c8750aa6560a3fc6dc204e56ef6e7545162..13841b1bdb356fb0b17b67e8df6954534122fbff 100644 (file)
@@ -1851,10 +1851,6 @@ public:
                 type = Lease::TYPE_NA;
                 break;
 
-            case Lease::TYPE_TA:
-                type = Lease::TYPE_TA;
-                break;
-
             case Lease::TYPE_PD:
                 type = Lease::TYPE_PD;
                 break;
index 46057c18ef0146267134546c79a5bf672c4575a5..24fddb4e9ecc81f8bf948923276fe9c0d8d427e7 100644 (file)
@@ -1548,7 +1548,6 @@ public:
         getColumnValue(r, row, col, raw_value);
         switch (raw_value) {
             case Lease6::TYPE_NA:
-            case Lease6::TYPE_TA:
             case Lease6::TYPE_PD:
                 value = static_cast<Lease6::Type>(raw_value);
                 break;
index 53d121f9a51cf94407db960a2a54a60a0cc74bc1..3e5f0ad8b53a6f05dfc32d6184d569d17b129a89 100644 (file)
@@ -115,16 +115,6 @@ TEST_F(Option6IATest, pdBasic) {
     checkIA(D6O_IA_PD);
 }
 
-// Check that this class cannot be used for IA_TA (IA_TA has no T1, T2 fields
-// and people tend to think that if it's good for IA_NA and IA_PD, it can
-// be used for IA_TA as well and that is not true)
-TEST_F(Option6IATest, taForbidden) {
-    EXPECT_THROW(Option6IA(D6O_IA_TA, buf_.begin(), buf_.begin() + 50),
-                 BadValue);
-
-    EXPECT_THROW(Option6IA(D6O_IA_TA, 123), BadValue);
-}
-
 // Check that getters/setters are working as expected.
 TEST_F(Option6IATest, simple) {
     scoped_ptr<Option6IA> ia(new Option6IA(D6O_IA_NA, 1234));