]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#2022] Added a comment about yhe unparking race
authorFrancis Dupont <fdupont@isc.org>
Thu, 22 Feb 2024 15:17:55 +0000 (16:17 +0100)
committerFrancis Dupont <fdupont@isc.org>
Fri, 23 Feb 2024 09:54:45 +0000 (10:54 +0100)
src/bin/dhcp4/dhcp4_srv.cc
src/bin/dhcp6/dhcp6_srv.cc

index 5359f44cb46e7661f97f06f24f355af27fd21f97..d726322ef6a6fc72830ca2ab97832505f96a6a8b 100644 (file)
@@ -752,6 +752,8 @@ Dhcpv4Srv::selectSubnet(const Pkt4Ptr& query, bool& drop,
                                     getCfgSubnets4()->getAll());
 
         // We proactively park the packet.
+        // Not MT compatible because the unparking callback can be called
+        // before the current thread exists from this block.
         HooksManager::park("subnet4_select", query,
                            [this, query, allow_answer_park] () {
                                processLocalizedQuery4AndSendResponse(query,
@@ -897,6 +899,8 @@ Dhcpv4Srv::selectSubnet4o6(const Pkt4Ptr& query, bool& drop,
                                     getCfgSubnets4()->getAll());
 
         // We proactively park the packet.
+        // Not MT compatible because the unparking callback can be called
+        // before the current thread exists from this block.
         HooksManager::park("subnet4_select", query,
                            [this, query, allow_answer_park] () {
                                processLocalizedQuery4AndSendResponse(query,
index fae5e93429a40d6343ec33f3961bd13e6c66f472..2fdbafd2fc2092204ea0b46fea0c7523284f82eb 100644 (file)
@@ -2017,6 +2017,8 @@ Dhcpv6Srv::selectSubnet(const Pkt6Ptr& question, bool& drop) {
                                     getCfgSubnets6()->getAll());
 
         // We proactively park the packet.
+        // Not MT compatible because the unparking callback can be called
+        // before the current thread exists from this block.
         HooksManager::park("subnet6_select", question,
                            [this, question] () {
                                processLocalizedQuery6AndSendResponse(question);