CVSROOT: /cvs Module name: src Changes by: d...@cvs.openbsd.org 2021/01/26 21:46:21
Modified files: sys/net : pf.c Log message: have pf_route{,6} clear the pf_pdesc mbuf ref early for route-to/reply-to. pf_route and pf_route6 are called to take over delivery of the packet with route-to and reply-to instead of letting it get processed normally. for the dup-to handling, it copies the mbuf but leaves the original mbuf in place. pf_route takes over the packet by clearing the mbuf pointer in the pf_pdesc struct. this diff moves the clearing of that pointer to the start of the function, rather than checking for dup-to again on the way out of the function. i think this is better because it means that it's more robust in the face of future code changes. even if that's not true, it's still shorter code in a forwarding path. ok sashan@ jmatthew@