]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1333] Improved comment
authorFrancis Dupont <fdupont@isc.org>
Thu, 17 Sep 2020 14:23:51 +0000 (16:23 +0200)
committerFrancis Dupont <fdupont@isc.org>
Fri, 18 Sep 2020 14:26:46 +0000 (16:26 +0200)
src/bin/dhcp4/dhcp4_srv.cc
src/bin/dhcp6/dhcp6_srv.cc

index f5b1a4a31141e9be445bee332c4234ee60a6ec2e..559e7a4374b60f80e6fcb8642e9ce9719e2fda74 100644 (file)
@@ -221,7 +221,9 @@ Dhcpv4Exchange::Dhcpv4Exchange(const AllocEnginePtr& alloc_engine,
             CfgMgr::instance().getCurrentCfg()->getClientClassDictionary();
         const ClientClassDefListPtr& defs_ptr = dict->getClasses();
         for (auto def : *defs_ptr) {
-            // Only remove evaluated classes.
+            // Only remove evaluated classes. Other classes can be
+            // assigned via hooks libraries and we should not remove
+            // them because there is no way they can be added back.
             if (def->getMatchExpr()) {
                 context_->query_->classes_.erase(def->getName());
             }
index 75a60d0a3bdca42a66eca367ed94c522a7d8c034..2b0caf36f5a516c89af6144c667fc1c8af346173 100644 (file)
@@ -471,7 +471,9 @@ Dhcpv6Srv::initContext(const Pkt6Ptr& pkt,
             CfgMgr::instance().getCurrentCfg()->getClientClassDictionary();
         const ClientClassDefListPtr& defs_ptr = dict->getClasses();
         for (auto def : *defs_ptr) {
-            // Only remove evaluated classes.
+            // Only remove evaluated classes. Other classes can be
+            // assigned via hooks libraries and we should not remove
+            // them because there is no way they can be added back.
             if (def->getMatchExpr()) {
                 ctx.query_->classes_.erase(def->getName());
             }