Skip to content

Fix ICMPv6 proxy selecting ::1 instead of interface GUA on IPv6-only hosts#1628

Open
huhndev wants to merge 1 commit intocloudflare:masterfrom
huhndev:icmpv6-source-address-selection
Open

Fix ICMPv6 proxy selecting ::1 instead of interface GUA on IPv6-only hosts#1628
huhndev wants to merge 1 commit intocloudflare:masterfrom
huhndev:icmpv6-source-address-selection

Conversation

@huhndev
Copy link
Copy Markdown

@huhndev huhndev commented Apr 3, 2026

Fixes #1626

Summary

  • On IPv6-only hosts, the ICMP proxy selected ::1 (loopback) as the IPv6 source address, making ICMPv6 proxying non-functional
  • The root cause was that determineICMPv6Src manually iterated network interfaces and picked the first IPv6 address found, which was ::1 on lo (enumerated first by the OS)
  • Replaced the manual interface iteration with findLocalAddr (UDP dial), matching the approach already used for IPv4 and letting the OS routing table select the correct source address

Test plan

  • Verified on an IPv6-only Debian 13 host that the source changes from ::1 in zone lo to the interface GUA
  • Verified end-to-end: ICMPv6 ping through WARP tunnel now receives replies (was 100% loss before)
  • make test passes (all tests, zero failures)
  • make fmt and make lint clean (at least no new warnings)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 ICMPv6 proxy selects loopback ::1 instead of interface GUA on IPv6-only host

1 participant