HomeFreeBSD

pf: consolidate pf function parameters

Description

pf: consolidate pf function parameters

Move off and hdrlen into pdesc
and change their type from int to u_int32_t. Do not pass struct
tcphdr *th and sa_family_t af, it is in pd anyway. Do not use af
and pd->af intermixed, the latter makes clear where it comes from.
Do not calculate the packet length again if pd already has it. Use
pd2.off instead of off2.
go go go go don't stop henning@ mpf@

Obtained from: OpenBSD, bluhm <bluhm@openbsd.org>, 110e53770d
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D46937

Details

Provenance
kpAuthored on Oct 2 2024, 2:45 PM
Differential Revision
D46937: pf: consolidate pf function parameters
Parents
rG9414b8dbf1e4: pf: unify some IPv4/IPv6 code in pf_setup_pdesc()
Branches
Unknown
Tags
Unknown