Page MenuHomeFreeBSD

ipsec: fix logic for IPSEC_CAP_BYPASS_FILTER
AbandonedPublic

Authored by kib on Jun 27 2023, 3:05 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 9, 3:45 AM
Unknown Object (File)
Oct 20 2024, 8:54 AM
Unknown Object (File)
Oct 5 2024, 5:22 PM
Unknown Object (File)
Sep 30 2024, 11:27 PM
Unknown Object (File)
Sep 30 2024, 8:54 PM
Unknown Object (File)
Sep 27 2024, 1:15 AM
Unknown Object (File)
Sep 17 2024, 5:24 PM
Unknown Object (File)
Sep 12 2024, 2:27 PM

Details

Reviewers
ae
Summary
The filter hooks code should be ignored if ip{4,6)_filtertunnel knob is
disabled, OR packet was already processed by IPSEC.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

kib requested review of this revision.Jun 27 2023, 3:05 AM

I think previous logic was correct and derived from code before IPsec overhaul.

The idea of this feature is that a received packet, that was previously protected by IPsec could be trusted and thus, there is no need to pass it through the firewall.
But when user sets net.inet.ipsec.fitertunnel=1 variable, even such trusted packets must be checked. Usually this is needed to keep firewall states tracking, some network translation, or just filtering for some addresses that were hidden inside IPsec tunnel before decapsulation.