HomeFreeBSD

pf: fix icmp-in-icmp handling with if-bound states

Description

pf: fix icmp-in-icmp handling with if-bound states

When we receive an ICMP packet containing another ICMP packet we look up the
original ICMP state. This is done through a second struct pf_pdesc ('pd2'),
containing relevant information (i.e. addresses, type, id, ..).
pd2 did not contain the network interface ('kif'), leading to state lookup
failures. This only affected if-bound mode, because floating states match all
interfaces.

Set kif in pd2.

Extend the icmp.py:test_fragmentation_needed test case to use if-bound mode. It
already checked that we handled icmp-in-icmp correctly.

PR: 284866
MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")

Details

Provenance
kpAuthored on Feb 19 2025, 12:28 PM
Parents
rG170059d6d33c: ssh: Fix cases where error codes were not correctly set
Branches
Unknown
Tags
Unknown