Page MenuHomeFreeBSD

pf: Rationalize the ip_divert_ptr test
ClosedPublic

Authored by markj on Jan 23 2026, 8:55 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 15, 3:30 PM
Unknown Object (File)
Fri, May 15, 3:30 PM
Unknown Object (File)
Fri, May 15, 10:35 AM
Unknown Object (File)
Fri, May 15, 5:35 AM
Unknown Object (File)
May 12 2026, 12:28 AM
Unknown Object (File)
May 11 2026, 4:43 AM
Unknown Object (File)
May 11 2026, 4:43 AM
Unknown Object (File)
May 11 2026, 3:25 AM

Details

Summary

If a rule has a divert port set, then we can reasonably predict that
ipdivert.ko is loaded, and in particular that ip_divert_ptr is set.

Moreover, in this case, if ipdivert.ko is not loaded we should just drop
the packet instead of ignoring the divert rule.

Diff Detail

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