]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1065] addressed review
authorRazvan Becheriu <razvan@isc.org>
Wed, 29 Jul 2020 09:09:52 +0000 (12:09 +0300)
committerRazvan Becheriu <razvan@isc.org>
Wed, 12 Aug 2020 06:56:43 +0000 (09:56 +0300)
src/hooks/dhcp/lease_cmds/lease_cmds.cc
src/hooks/dhcp/lease_cmds/lease_parser.cc

index cfc6323432a0171b6d4e3b2c4ceecf88e3890ff0..03c5658a5145e1497b2d353ab7ada9136195f62d 100644 (file)
@@ -428,8 +428,6 @@ LeaseCmdsImpl::updateStatsOnAdd(const Lease6Ptr& lease) {
                                    lease->type_ == Lease::TYPE_NA ?
                                    "assigned-nas" : "assigned-pds"),
             int64_t(1));
-        // @node current code does not check for declined PD
-        // code must be updated in parser (see @todo in lease_parser.cc)
         if (lease->stateDeclined()) {
             StatsMgr::instance().addValue("declined-addresses", int64_t(1));
 
@@ -512,8 +510,6 @@ LeaseCmdsImpl::updateStatsOnUpdate(const Lease6Ptr& existing,
                                        "assigned-nas" : "assigned-pds"),
                 int64_t(-1));
         }
-        // @node current code does not check for declined PD
-        // code must be updated in parser (see @todo in lease_parser.cc)
         if (existing->stateDeclined()) {
             // old lease is declined
             StatsMgr::instance().addValue("declined-addresses", int64_t(-1));
@@ -532,8 +528,6 @@ LeaseCmdsImpl::updateStatsOnUpdate(const Lease6Ptr& existing,
                                            "assigned-nas" : "assigned-pds"),
                     int64_t(1));
             }
-            // @node current code does not check for declined PD
-            // code must be updated in parser (see @todo in lease_parser.cc)
             if (lease->stateDeclined()) {
                 // new lease is declined
                 StatsMgr::instance().addValue("declined-addresses", int64_t(1));
@@ -553,8 +547,6 @@ LeaseCmdsImpl::updateStatsOnUpdate(const Lease6Ptr& existing,
                                        lease->type_ == Lease::TYPE_NA ?
                                        "assigned-nas" : "assigned-pds"),
                 int64_t(1));
-            // @node current code does not check for declined PD
-            // code must be updated in parser (see @todo in lease_parser.cc)
             if (lease->stateDeclined()) {
                 // new lease is declined
                 StatsMgr::instance().addValue("declined-addresses", int64_t(1));
@@ -594,8 +586,6 @@ LeaseCmdsImpl::updateStatsOnDelete(const Lease6Ptr& lease) {
                                    lease->type_ == Lease::TYPE_NA ?
                                    "assigned-nas" : "assigned-pds"),
             int64_t(-1));
-        // @node current code does not check for declined PD
-        // code must be updated in parser (see @todo in lease_parser.cc)
         if (lease->stateDeclined()) {
             StatsMgr::instance().addValue("declined-addresses", int64_t(-1));
 
index 257f7aea191bd90be98efbd0f453ca2492b67c74..c8048c6ea6c8aa0abc39abff5607d04eeceb6814 100644 (file)
@@ -137,14 +137,6 @@ Lease4Parser::parse(ConstSrvConfigPtr& cfg,
                   "values are: 0 (default), 1 (declined) and 2 (expired-reclaimed)");
     }
 
-    /// @todo throw if PD address is in declined state
-    /*
-    if (state == Lease::STATE_DECLINED && type == Lease::TYPE_PD) {
-        isc_throw(isc::InvalidOperation,
-                  "invalid PD address in declined state");
-    }
-    */
-
     // Handle user context.
     ConstElementPtr ctx = lease_info->get("user-context");
     if (ctx && (ctx->getType() != Element::map)) {