Skip to content

fix(iroh): convert to canonical IP address in IpSender#3506

Merged
dignifiedquire merged 1 commit intomainfrom
fix-addr-mapping
Oct 7, 2025
Merged

fix(iroh): convert to canonical IP address in IpSender#3506
dignifiedquire merged 1 commit intomainfrom
fix-addr-mapping

Conversation

@dignifiedquire
Copy link
Copy Markdown
Contributor

Description

Our AsyncUdpSocket is always an IPv6 socket, because we need to sent to our IPv6 ULAs for the mapped addresses. This means Quinn will convert any IPv4 destination into an IPv4-mapped IPv6 address (::ffff:a.b.c.d).

But our sockets are bound to a specific family, so even if the OS supports and IPv6 socket that can handle IPv4 it will not accept those addresses. So when we are using the destinations we need to convert back to the canonical addresses in the IPSender.

Based on 4eb0f07

Our AsyncUdpSocket is always an IPv6 socket, because we need to sent
to our IPv6 ULAs for the mapped addresses.  This means Quinn will
convert any IPv4 destination into an IPv4-mapped IPv6
address (::ffff:a.b.c.d).

But our sockets are bound to a specific family, so even if the OS
supports and IPv6 socket that can handle IPv4 it will not accept those
addresses.  So when we are using the destinations we need to convert
back to the canonical addresses in the IPSender.
@dignifiedquire dignifiedquire requested a review from flub October 7, 2025 13:15
@dignifiedquire dignifiedquire self-assigned this Oct 7, 2025
@dignifiedquire dignifiedquire added this to the v0.93.0 milestone Oct 7, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Oct 7, 2025

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/3506/docs/iroh/

Last updated: 2025-10-07T13:17:59Z

@github-actions
Copy link
Copy Markdown

github-actions bot commented Oct 7, 2025

Netsim report & logs for this PR have been generated and is available at: LOGS
This report will remain available for 3 days.

Last updated for commit: d9a4a68

@dignifiedquire dignifiedquire added this pull request to the merge queue Oct 7, 2025
@n0bot n0bot bot added this to iroh Oct 7, 2025
@github-project-automation github-project-automation bot moved this to 🏗 In progress in iroh Oct 7, 2025
Merged via the queue into main with commit 44c3c27 Oct 7, 2025
51 of 54 checks passed
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in iroh Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants