HomeFreeBSD

pf: return errors from pf_route() and pf_route6()

Description

pf: return errors from pf_route() and pf_route6()

If we fail to route the packet in pf_route()/pf_route6() (e.g. because it
hit the TTL limit) we free the mbuf. If that packet is an SCTP packet that
establishes extra (i.e. multihome) states we have a queued job to handle that.
These jobs reference the now freed mbuf.

Pass the error from pf_route()/pf_route6() on, so that
pf_sctp_multihome_delayed() doesn't attempt to use the invalid mbuf pointer (or
establishes states for a packet we're not passing).

PR: 288274
Reported by: Robert Morris <rtm@lcs.mit.edu>
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D51627

Details

Provenance
kpAuthored on Jul 28 2025, 4:00 PM
Differential Revision
D51627: pf: return errors from pf_route() and pf_route6()
Parents
rGf90940ce6eb7: vm_page: Fix handling of empty bad memory addresses file
Branches
Unknown
Tags
Unknown