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

feat: add support for original_dst for windows #529

Merged
merged 8 commits into from
Nov 27, 2024

Conversation

keithmattix
Copy link
Contributor

@keithmattix keithmattix commented Sep 12, 2024

I noticed there wasn't support for original dst in Windows, so I added it. Also add windows gnu target to allow cross compiling

Copy link
Collaborator

@Thomasdezeeuw Thomasdezeeuw left a comment

Choose a reason for hiding this comment

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

It seems that at least Linux has SO_ORIGINAL_DST and IP6T_SO_ORIGINAL_DST as well, can we add it for it as well?

@keithmattix
Copy link
Contributor Author

@Thomasdezeeuw it's already added in the sys/unix.rs file:

pub fn original_dst(&self) -> io::Result<SockAddr> {

@Thomasdezeeuw
Copy link
Collaborator

@Thomasdezeeuw it's already added in the sys/unix.rs file:

pub fn original_dst(&self) -> io::Result<SockAddr> {

Ah, in that case it should be moved to the src/socket.rs file to ensure the API is the same across OS.

@keithmattix
Copy link
Contributor Author

Ok yeah I had that thought but wanted to confirm. Will make the change!

@keithmattix
Copy link
Contributor Author

@Thomasdezeeuw any clue what's going on with the FreeBSD CI? From what I can tell, it looks like it's failing due to the test runners not support ipv6

src/socket.rs Outdated Show resolved Hide resolved
src/socket.rs Show resolved Hide resolved
@keithmattix
Copy link
Contributor Author

I opened #534 to address the FreeBSD failures

@keithmattix
Copy link
Contributor Author

@Thomasdezeeuw gentle ping for review

src/sys/unix.rs Outdated Show resolved Hide resolved
src/socket.rs Outdated Show resolved Hide resolved
src/socket.rs Outdated Show resolved Hide resolved
tests/socket.rs Outdated Show resolved Hide resolved
Signed-off-by: Keith Mattix II <[email protected]>
src/sys/unix.rs Outdated Show resolved Hide resolved
src/sys/unix.rs Outdated Show resolved Hide resolved
src/sys/windows.rs Outdated Show resolved Hide resolved
src/sys/windows.rs Outdated Show resolved Hide resolved
tests/socket.rs Outdated Show resolved Hide resolved
@Thomasdezeeuw Thomasdezeeuw mentioned this pull request Nov 27, 2024
@Thomasdezeeuw Thomasdezeeuw enabled auto-merge (squash) November 27, 2024 16:11
@Thomasdezeeuw Thomasdezeeuw merged commit 33a98be into rust-lang:master Nov 27, 2024
39 of 42 checks passed
@Thomasdezeeuw
Copy link
Collaborator

Thanks @keithmattix

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.

2 participants