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
Unknown Object (File)
Fri, Apr 11, 2:37 AM
Unknown Object (File)
Sun, Apr 6, 1:11 AM
Unknown Object (File)
Mar 22 2025, 5:33 AM
Unknown Object (File)
Mar 21 2025, 7:39 AM
Unknown Object (File)
Mar 20 2025, 10:52 AM
Unknown Object (File)
Mar 19 2025, 1:09 AM
Unknown Object (File)
Mar 18 2025, 5:58 AM
Unknown Object (File)
Mar 17 2025, 6:38 AM

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.