Skip to content

Commit 03e7646

Browse files
committed
[#2022] Added a comment about yhe unparking race
1 parent 8f254fb commit 03e7646

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/bin/dhcp4/dhcp4_srv.cc

+4
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,8 @@ Dhcpv4Srv::selectSubnet(const Pkt4Ptr& query, bool& drop,
752752
getCfgSubnets4()->getAll());
753753

754754
// We proactively park the packet.
755+
// Not MT compatible because the unparking callback can be called
756+
// before the current thread exists from this block.
755757
HooksManager::park("subnet4_select", query,
756758
[this, query, allow_answer_park] () {
757759
processLocalizedQuery4AndSendResponse(query,
@@ -897,6 +899,8 @@ Dhcpv4Srv::selectSubnet4o6(const Pkt4Ptr& query, bool& drop,
897899
getCfgSubnets4()->getAll());
898900

899901
// We proactively park the packet.
902+
// Not MT compatible because the unparking callback can be called
903+
// before the current thread exists from this block.
900904
HooksManager::park("subnet4_select", query,
901905
[this, query, allow_answer_park] () {
902906
processLocalizedQuery4AndSendResponse(query,

src/bin/dhcp6/dhcp6_srv.cc

+2
Original file line numberDiff line numberDiff line change
@@ -2017,6 +2017,8 @@ Dhcpv6Srv::selectSubnet(const Pkt6Ptr& question, bool& drop) {
20172017
getCfgSubnets6()->getAll());
20182018

20192019
// We proactively park the packet.
2020+
// Not MT compatible because the unparking callback can be called
2021+
// before the current thread exists from this block.
20202022
HooksManager::park("subnet6_select", question,
20212023
[this, question] () {
20222024
processLocalizedQuery6AndSendResponse(question);

0 commit comments

Comments
 (0)