Page MenuHomeFreeBSD

pf: fix ICMP source address translation for nat64
ClosedPublic

Authored by kp on Feb 26 2025, 10:42 PM.
Tags
None
Referenced Files
F132343752: D49143.id151901.diff
Thu, Oct 16, 2:16 AM
F132339108: D49143.id151864.diff
Thu, Oct 16, 1:16 AM
Unknown Object (File)
Thu, Oct 2, 3:32 AM
Unknown Object (File)
Wed, Oct 1, 8:24 AM
Unknown Object (File)
Fri, Sep 26, 5:28 AM
Unknown Object (File)
Sat, Sep 20, 3:23 PM
Unknown Object (File)
Aug 25 2025, 1:50 PM
Unknown Object (File)
Aug 14 2025, 11:23 PM

Details

Summary

While handling an ICMP error related to another state (e.g. TTL expired, port
closed, fragmentation needed, ...) we can't just use the state's source address
as the ICMP source address. We have to translate the IPv4 address back to an
IPv6 nat64 address.

Failing to do so breaks things like traceroute, where the intermediate router
generates an ICMP error message, and the traceroute tool uses the source address
to build the path.

PR: 284944
Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

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

Event Timeline

kp requested review of this revision.Feb 26 2025, 10:42 PM

Use the approach from OpenBSD's proposed patch.
That's a bit simpler and still works.

Update to the committed OpenBSD version of this fix.

This revision was not accepted when it landed; it landed in state Needs Review.Mar 5 2025, 9:38 AM
This revision was automatically updated to reflect the committed changes.