Skip to content

Commit

Permalink
[#2022] Added a comment about yhe unparking race
Browse files Browse the repository at this point in the history
  • Loading branch information
fxdupont committed Feb 23, 2024
1 parent 8f254fb commit 03e7646
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/bin/dhcp4/dhcp4_srv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions src/bin/dhcp6/dhcp6_srv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 03e7646

Please sign in to comment.