HomeFreeBSD

pf: fix handling unreassembled fragments

Description

pf: fix handling unreassembled fragments

If we handle a fragment and are configured not to reassemble it the
pd->proto field will show the layer 4 protocol (i.e. UDP,TCP,SCTP,...) but
pd->virtual_proto will show we're a fragment.
In that case we also don't have the layer 4 checksum pointer. Have code that
cares about L4 (e.g. NAT) check virtual_proto so it doesn't try to dereference a
NULL pcksum field.

PR: 288549
Reported by: Danilo Egea Gondolfo <danilo@FreeBSD.org>
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D51722

Details

Provenance
kpAuthored on Aug 4 2025, 8:29 AM
Differential Revision
D51722: pf: fix handling unreassembled fragments
Parents
rGf2e956c915fd: pf tests: robustness improvement
Branches
Unknown
Tags
Unknown