HomeFreeBSD

pf: fix ICMP ECHO handling of ID conflicts

Description

pf: fix ICMP ECHO handling of ID conflicts

After applying FreeBSD-SA-24:05.pf, a problem with ICMP ECHO passing
through PF NAT was raised: two or more Windows workstations cannot ping
the same destination address at the same time. More precisely, only one
workstation pings normally, while the pings of the others are rejected
by the packet filter.

The thing is that Windows always uses the same ICMP ID (1). Therefore,
the state is created only for the workstation that started pinging
earlier.

In the pf_get_sport() function, we compare *nport with the ICMP_ECHO constant,
while icmptype (virtual_type actually) is passed in the pd->ndport parameter.

MFC after: 2 weeks
Reviewed by: kp

Details

Provenance
Damir Bikmuhametov <boco@ufanet.ru>Authored on Jun 26 2025, 5:26 PM
kpCommitted on Jun 27 2025, 11:12 AM
Parents
rG5aedb8b1d4a6: mmc_da: fix garbage in disk->d_attachment
Branches
Unknown
Tags
Unknown