HomeFreeBSD

pf: fix dummynet + ipdivert use case

Description

pf: fix dummynet + ipdivert use case

Dummynet re-injects an mbuf with MTAG_IPFW_RULE added, and the same mtag
is used by divert(4) as parameters for packet diversion.

If according to pf rule set a packet should go through dummynet first
and through ipdivert after then mentioned mtag must be removed after
dummynet not to make ipdivert think that this is its input parameters.

At the very beginning ipfw consumes this mtag what means the same
behavior with tag clearing after dummynet.

And after fabf705f4b5a pf passes parameters to ipdivert using its
personal MTAG_PF_DIVERT mtag.

PR: 274850
Reviewed by: kp
Differential Revision: https://reviews.freebsd.org/D42609

(cherry picked from commit fe3bb40b9e807d4010617de1ef040ba3aa623487)

Details

Provenance
igor.ostapenko_pm.meAuthored on Nov 17 2023, 4:04 PM
kpCommitted on Nov 20 2023, 10:30 AM
Reviewer
kp
Differential Revision
D42609: pf: fix dummynet + ipdivert use case
Parents
rG0784b5768e00: vn_copy_file_range(): busy both in and out mp around call to…
Branches
Unknown
Tags
Unknown