]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#4368] Cleaned up IA_TA references
authorFrancis Dupont <fdupont@isc.org>
Sun, 3 May 2026 12:31:31 +0000 (14:31 +0200)
committerFrancis Dupont <fdupont@isc.org>
Thu, 7 May 2026 14:13:00 +0000 (16:13 +0200)
src/bin/dhcp6/dhcp6_srv.cc
src/bin/dhcp6/dhcp6_srv.h
src/bin/dhcp6/tests/dhcp6_client.h
src/hooks/dhcp/lease_cmds/lease_cmds.cc
src/hooks/dhcp/lease_cmds/lease_parser.cc
src/hooks/dhcp/mysql/mysql_host_data_source.cc
src/hooks/dhcp/radius/radius_accounting.cc
src/lib/dhcpsrv/subnet.cc

index cbe01f6e3ad0215709a072146bc19e5c00724a7b..4dbf20c8961d7c4f43c738b770894856702de1ab 100644 (file)
@@ -2301,8 +2301,7 @@ Dhcpv6Srv::assignLeases(const Pkt6Ptr& question, Pkt6Ptr& answer,
     ConstSubnet6Ptr orig_subnet = ctx.subnet_;
 
     // We need to allocate addresses for all IA_NA options in the client's
-    // question (i.e. SOLICIT or REQUEST) message.
-    // @todo add support for IA_TA
+    // question (i.e. SOLICIT or REQUEST) message. IA_TA options are ignored.
 
     // For the lease allocation it is critical that the client has sent
     // DUID. There is no need to check for the presence of the DUID here
@@ -2311,8 +2310,6 @@ Dhcpv6Srv::assignLeases(const Pkt6Ptr& question, Pkt6Ptr& answer,
     // Now that we have all information about the client, let's iterate over all
     // received options and handle IA_NA options one by one and store our
     // responses in answer message (ADVERTISE or REPLY).
-    //
-    // @todo: IA_TA once we implement support for temporary addresses.
     for (auto const& opt : question->options_) {
         switch (opt.second->getType()) {
         case D6O_IA_NA: {
@@ -3326,8 +3323,7 @@ Dhcpv6Srv::extendLeases(const Pkt6Ptr& query, Pkt6Ptr& reply,
                        AllocEngine::ClientContext6& ctx) {
 
     // We will try to extend lease lifetime for all IA options in the client's
-    // Renew or Rebind message.
-    /// @todo add support for IA_TA
+    // Renew or Rebind message. IA_TA options are ignored.
 
     // For the lease extension it is critical that the client has sent
     // DUID. There is no need to check for the presence of the DUID here
@@ -3374,9 +3370,8 @@ Dhcpv6Srv::releaseLeases(const Pkt6Ptr& release, Pkt6Ptr& reply,
                          AllocEngine::ClientContext6& ctx) {
 
     // We need to release addresses for all IA options in the client's
-    // RELEASE message.
+    // RELEASE message. IA_TA options are ignored.
 
-    /// @todo Add support for IA_TA
     /// @todo Consider supporting more than one address in a single IA.
     /// It is allowed by RFC 8415, but it is not widely implemented. The only
     /// software that supports that is Dibbler, but its author seriously doubts
@@ -3410,7 +3405,7 @@ Dhcpv6Srv::releaseLeases(const Pkt6Ptr& release, Pkt6Ptr& reply,
             }
             break;
         }
-        // @todo: add support for IA_TA
+        case D6O_IA_TA:
         default:
             // remaining options are stateless and thus ignored in this context
             ;
index 9ab9af583e067a27d94dcf1673ad0b778ca6ab85..8ad007c9138b007ac9284e1024b970a95e8a5c0e 100644 (file)
@@ -705,7 +705,7 @@ protected:
     /// @brief Assigns leases.
     ///
     /// It supports non-temporary addresses (IA_NA) and prefixes (IA_PD). It
-    /// does NOT support temporary addresses (IA_TA).
+    /// does NOT (and shall NEVER) support temporary addresses (IA_TA).
     ///
     /// @param question client's message (with requested IA options)
     /// @param answer server's message (IA options will be added here).
index e26ee42a696ccc47984ee14a7da532a70660ceff..8237e3a7260dd5aa34cc9e5085e190843e921aa1 100644 (file)
@@ -848,8 +848,6 @@ private:
     ///
     /// @param source Message from which IA options will be copied.
     /// @param dest Message to which IA options will be copied.
-    ///
-    /// @todo Add support for IA_TA.
     void copyIAs(const Pkt6Ptr& source, const Pkt6Ptr& dest);
 
     /// @brief Creates IA options from existing configuration.
index e6ce85f372bfb4053ecc2c878dd0bf5b746625ed..3c833d5a5a0ed1f29d6758ae48bee0b1111e58e5 100644 (file)
@@ -716,16 +716,13 @@ LeaseCmdsImpl::getParameters(bool v6, const ConstElementPtr& params) {
         string t = params->get("type")->stringValue();
         if (t == "IA_NA" || t == "0") {
             x.lease_type = Lease::TYPE_NA;
-        } else if (t == "IA_TA" || t == "1") {
-            x.lease_type = Lease::TYPE_TA;
         } else if (t == "IA_PD" || t == "2") {
             x.lease_type = Lease::TYPE_PD;
         } else if (t == "V4" || t == "3") {
             x.lease_type = Lease::TYPE_V4;
         } else {
-            isc_throw(BadValue, "Invalid lease type specified: "
-                      << t << ", only supported values are: IA_NA, IA_TA,"
-                      << " IA_PD and V4");
+            isc_throw(BadValue, "Invalid lease type specified: " << t
+                      << ", only supported values are: IA_NA, IA_PD and V4");
         }
     }
 
index 86b9cc1c064a4694d887bdf2f44df1b6e81af69b..476390d3025eefb885eb06bdd02f2bc663ff966f 100644 (file)
@@ -223,8 +223,6 @@ Lease6Parser::parse(ConstSrvConfigPtr& cfg,
         string txt = getString(lease_info, "type");
         if (txt == "IA_NA") {
             type = Lease::TYPE_NA;
-        } else if (txt == "IA_TA") {
-            type = Lease::TYPE_TA;
         } else if (txt == "IA_PD") {
             type = Lease::TYPE_PD;
 
index ea4e9c1a9a74823bccfeb8c588a2d4f921f6d1b2..77113cdef4effce69acd359728f7cbf99f6577f0 100644 (file)
@@ -1814,7 +1814,7 @@ public:
             bind_[1].is_unsigned = MLM_TRUE;
 
             // type tinyint
-            // See lease6_types for values (0 = IA_NA, 1 = IA_TA, 2 = IA_PD)
+            // See lease6_types for values (0 = IA_NA, 2 = IA_PD)
             type_ = resv.getType() == IPv6Resrv::TYPE_NA ? 0 : 2;
             bind_[2].buffer_type = MYSQL_TYPE_TINY;
             bind_[2].buffer = reinterpret_cast<char*>(&type_);
index a1d57f4330fdf0d31c00c703e497a6f06c72a26c..de7e7c760dab08f8fea8343f7f8500c9d22320dd 100644 (file)
@@ -592,8 +592,6 @@ RadiusAccounting::buildAcct6(const ConstElementPtr& arguments, Event event) {
             txt = SimpleParser::getString(arguments, "type");
             if (txt == "IA_NA") {
                 type = Lease::TYPE_NA;
-            } else if (txt == "IA_TA") {
-                type = Lease::TYPE_TA;
             } else if (txt == "IA_PD") {
                 type = Lease::TYPE_PD;
 
index 99ce36a60e628c985fb19714602b928d58daf270..249440cc3b0a52d65ae8087429c7640173bb3789 100644 (file)
@@ -664,12 +664,6 @@ Subnet6::create(const IOAddress& prefix, uint8_t length,
                          (Lease::TYPE_NA, subnet));
     subnet->setAllocationState(Lease::TYPE_NA,
                                SubnetIterativeAllocationState::create(subnet));
-    // IA_TA
-    subnet->setAllocator(Lease::TYPE_TA,
-                         boost::make_shared<IterativeAllocator>
-                         (Lease::TYPE_TA, subnet));
-    subnet->setAllocationState(Lease::TYPE_TA,
-                               SubnetIterativeAllocationState::create(subnet));
     // IA_PD
     subnet->setAllocator(Lease::TYPE_PD,
                          boost::make_shared<IterativeAllocator>