Page MenuHomeFreeBSD

ipfw: teach ipfw that pfsync is an upper layer protocol
ClosedPublic

Authored by kp on Jul 11 2023, 12:40 PM.
Tags
None
Referenced Files
F157410600: D40973.id124494.diff
Thu, May 21, 2:47 AM
F157382374: D40973.id124495.diff
Wed, May 20, 8:29 PM
Unknown Object (File)
Wed, May 20, 1:12 AM
Unknown Object (File)
Tue, May 19, 9:54 PM
Unknown Object (File)
Sun, May 17, 3:32 PM
Unknown Object (File)
Wed, May 13, 10:09 PM
Unknown Object (File)
Wed, May 13, 10:09 PM
Unknown Object (File)
Wed, May 13, 10:09 PM

Details

Summary

Explicitly add pfsync as a know upper layer protocol so we don't
automatically discard pfsync packets (carried over IPv6).

net.inet6.ip6.fw.deny_unknown_exthdrs defaults to 1, so even if
net.inet.ip.fw.default_to_accept is set to 1 we'd discard pfsync (over
IPv6).

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 52561
Build 49452: arc lint + arc unit

Event Timeline

kp requested review of this revision.Jul 11 2023, 12:40 PM

I don't like adding extra printfs on fast path processing. This can easily make your system unresponsive.

sys/netpfil/ipfw/ip_fw2.c
1727

this can be quite verbose

Oh sorry, that's git-arc adding uncommitted changes to the diff. Let me clean that up.

Remove unrelated changes.

This is something we ran into with the pfsync-over-ip6 diff in https://reviews.freebsd.org/D40102.

The test cases failed on my system because I load both ipfw and pf (mostly by accident, but the CI tests do this too), and ipfw blocked the pfsync packets even though net.inet.ip.fw.default_to_accept was set to 1.

This revision is now accepted and ready to land.Jul 11 2023, 2:38 PM