Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(transport): repair IPv6 support #3793

Merged
merged 2 commits into from
Mar 21, 2025
Merged

fix(transport): repair IPv6 support #3793

merged 2 commits into from
Mar 21, 2025

Conversation

alpeb
Copy link
Member

@alpeb alpeb commented Mar 20, 2025

In #3626, we refactored the origin_dst determination logic to utilize socket2 calls. However, this change inadvertently disrupted IPv6 and dual-stack support, causing the server to fail to start when deployed on such network configurations:

WARN ThreadId(01) inbound: linkerd_app_core::serve: Server failed to accept connection error=No such file or directory (os error 2)

This change reintroduces detection of the current network family, calling socket2's original_dst() or original_dst_ipv6() depending on the case.

Tested fine in both IPv6 and dual-stack Kind clusters.

In #3626, we refactored the origin_dst determination logic to utilize
socket2 calls. However, this change inadvertently disrupted IPv6 and
dual-stack support, causing the server to fail to start when deployed on
such network configurations:

```
WARN ThreadId(01) inbound: linkerd_app_core::serve: Server failed to accept connection error=No such file or directory (os error 2)
```

This change reintroduces detection of the current network family,
calling socket2's `original_dst()` or `original_dst_ipv6()` depending on
the case.

Tested fine in both IPv6 and dual-stack Kind clusters.
@alpeb alpeb requested a review from a team as a code owner March 20, 2025 21:30
@alpeb
Copy link
Member Author

alpeb commented Mar 20, 2025

@zaharidichev, tagging you for this—can you test firing it up on Windows?

});

Ok((addr, Box::pin(incoming)))
}
}

fn orig_dst(sock: TcpStream) -> io::Result<(OrigDstAddr, TcpStream)> {
Copy link
Member

@olix0r olix0r Mar 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we preserve the orig_dst helper function rather than inlining the whole thing? perhaps passing in the client_addr..

@olix0r olix0r merged commit f1768a3 into main Mar 21, 2025
15 checks passed
@olix0r olix0r deleted the alpeb/fix-ipv6 branch March 21, 2025 16:54
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.

3 participants