HomeFreeBSD

pf: clear PF_TAG_DUMMYNET for dummynet fast path

Description

pf: clear PF_TAG_DUMMYNET for dummynet fast path

ip_dn_io_ptr() (i.e. dummynet_io()) can return the mbuf immediately (as
opposed to owning it and later passing it through dummynet_send(), which
returns it to pf_test()). In that case we must clear the PF_TAG_DUMMYNET
flag to ensure we don't skip any subsequent firewall passes.

This can happen if we process a packet in PFIL_IN, set PF_TAG_DUMMYNET
on it, pass it to ip_dn_io_ptr() but have it returned immediately. The
packet continues its normal path, eventually hitting
pf_test(dir=PFIL_OUT), where we'd skip when we're not supposed to.

Sponsored by: Rubicon Communications, LLC ("Netgate")

Details

Provenance
kpAuthored on May 5 2022, 7:21 AM
Parents
rGa85fea31c5cb: iosched: remove stray debug
Branches
Unknown
Tags
Unknown