CVSROOT:        /cvs
Module name:    src
Changes by:     d...@cvs.openbsd.org    2019/09/12 19:47:51

Modified files:
        sys/net        : if_pflog.c 

Log message:
avoid the use of a custom bpf copy function.

currently pflog prepares a pfloghdr and then passes that, the
original mbuf, and a pflog copy function to bpf. bpf matches on the
original packet, and then if bpf decides it wants the packet it
uses the custom function to copy the packet for userland to read.
the custom function patches the packet so you see the packet after
nat and rdr and af-to and so on. however, this means bpf is matching
on the original packet and reporting a patched packet.

this is also the only use of a custom copy function in the tree,
and it relies on some behaviours that should be internal to bpf to
get away with it.

this pulls the patching up so it's done before the packet is given
to bpf. this simplifies the code a bit, and means bpf is now matching
on and reporting the same packet. removing this custom copy code
also means that we can get rid of that functionality from the
bpf_mtap_hdr function.

ok sashan@ visa@

Reply via email to