Skip to content

Commit

Permalink
Fix endian swap on SocketAddrV6.
Browse files Browse the repository at this point in the history
flowinfo and scope_id should not be byte swapped.
  • Loading branch information
aarond10 committed Jan 10, 2023
1 parent bbb97bf commit 62eb8dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -2,7 +2,7 @@
name = "nix"
description = "Rust friendly bindings to *nix APIs"
edition = "2021"
version = "0.26.1"
version = "0.26.2"
rust-version = "1.63"
authors = ["The nix-rust Project Developers"]
repository = "https://github.com/nix-rust/nix"
Expand Down
4 changes: 2 additions & 2 deletions src/sys/socket/addr.rs
Expand Up @@ -1182,8 +1182,8 @@ impl From<SockaddrIn6> for net::SocketAddrV6 {
net::SocketAddrV6::new(
net::Ipv6Addr::from(addr.0.sin6_addr.s6_addr),
u16::from_be(addr.0.sin6_port),
u32::from_be(addr.0.sin6_flowinfo),
u32::from_be(addr.0.sin6_scope_id),
addr.0.sin6_flowinfo,
addr.0.sin6_scope_id,
)
}
}
Expand Down

0 comments on commit 62eb8dc

Please sign in to comment.