Page MenuHomeFreeBSD

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

Authored by kp on Tue, Jul 29, 7:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Aug 12, 9:00 PM
Unknown Object (File)
Tue, Aug 12, 12:40 PM
Unknown Object (File)
Mon, Aug 11, 12:37 AM
Unknown Object (File)
Mon, Aug 4, 8:12 AM
Unknown Object (File)
Sun, Aug 3, 9:24 AM
Unknown Object (File)
Fri, Aug 1, 3:16 PM
Unknown Object (File)
Fri, Aug 1, 2:55 PM
Unknown Object (File)
Fri, Aug 1, 1:07 AM

Details

Summary

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")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kp requested review of this revision.Tue, Jul 29, 7:38 PM
This revision was not accepted when it landed; it landed in state Needs Review.Mon, Aug 4, 8:12 AM
This revision was automatically updated to reflect the committed changes.