Skip to content

Commit

Permalink
Merge #1925
Browse files Browse the repository at this point in the history
1925: fix: send ETH_P_ALL in htons format r=asomers a=tzneal



Co-authored-by: Todd Neal <[email protected]>
  • Loading branch information
bors[bot] and tzneal authored Mar 21, 2023
2 parents b2318f9 + 06eb8ff commit f38b721
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
### Fixed
- Fix `SockaddrIn6` bug that was swapping flowinfo and scope_id byte ordering.
([#1964](https://github.com/nix-rust/nix/pull/1964))
- Fix: send ETH_P_ALL in htons format
([#1925](https://github.com/nix-rust/nix/pull/1925))

### Removed

Expand Down
2 changes: 1 addition & 1 deletion src/sys/socket/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ pub enum SockProtocol {
// The protocol number is fed into the socket syscall in network byte order.
#[cfg(any(target_os = "android", target_os = "linux"))]
#[cfg_attr(docsrs, doc(cfg(all())))]
EthAll = libc::ETH_P_ALL.to_be(),
EthAll = (libc::ETH_P_ALL as u16).to_be() as i32,
/// The Controller Area Network raw socket protocol
/// ([ref](https://docs.kernel.org/networking/can.html#how-to-use-socketcan))
#[cfg(target_os = "linux")]
Expand Down

0 comments on commit f38b721

Please sign in to comment.