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

nix::sys::socket::InetAddr::from_std ignores sin6_flowinfo and sin6_scope_id #329

Closed
misuzu opened this issue Mar 22, 2016 · 5 comments
Closed

Comments

@misuzu
Copy link

misuzu commented Mar 22, 2016

sin6_flowinfo and sin6_scope_id is essential for link-local addresses.
Related: tokio-rs/mio#376

@misuzu misuzu changed the title nix::sys::socket::InetAddr ignores sin6_flowinfo and sin6_scope_id nix::sys::socket::InetAddr::from_std ignores sin6_flowinfo and sin6_scope_id Mar 22, 2016
@kamalmarhubi
Copy link
Member

Hi @misuzu! Could you explain a bit more clearly what the issue is about? Is it adding APIs?

@misuzu
Copy link
Author

misuzu commented Mar 29, 2016

@kamalmarhubi
SocketAddrV6 have flowinfo and scope_id: https://doc.rust-lang.org/std/net/struct.SocketAddrV6.html
InetAddr::from_std only uses address and port so flowinfo and scope_id is lost after conversion: https://github.com/nix-rust/nix/blob/master/src/sys/socket/addr.rs#L44
There is also no way to manually create InetAddr with flowinfo and scope_id.

@kamalmarhubi
Copy link
Member

Thanks for the clarification! I just opened #335 to fix it.

@fiveop
Copy link
Contributor

fiveop commented Mar 30, 2016

I suggest that @misuzu reviews the fixing PR.

@kamalmarhubi
Copy link
Member

Great idea!

kamalmarhubi added a commit to kamalmarhubi/nix-rust that referenced this issue Mar 30, 2016
kamalmarhubi added a commit to kamalmarhubi/nix-rust that referenced this issue Mar 30, 2016
@homu homu closed this as completed in #335 Mar 31, 2016
homu added a commit that referenced this issue Mar 31, 2016
socket: Respect IPv6 flowinfo and scope_id in InetAddr::from_std

Fixes #329
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

No branches or pull requests

3 participants