diff options
author | Todd Neal <toddneal@protonmail.com> | 2022-12-08 03:58:34 +0000 |
---|---|---|
committer | Todd Neal <tnealt@amazon.com> | 2023-03-20 21:07:59 -0500 |
commit | 06eb8ffaadabebbc884ce6f6e90a8261866d9ca4 (patch) | |
tree | e8a533279ea888be8b5e5d0b5eb2ef68beef006e | |
parent | b2318f98d31ff96bcd8f85910766a48638c16622 (diff) | |
download | nix-06eb8ffaadabebbc884ce6f6e90a8261866d9ca4.zip |
fix: send ETH_P_ALL in htons format
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | src/sys/socket/mod.rs | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index e8bde843..e52344b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/sys/socket/mod.rs b/src/sys/socket/mod.rs index 00c90560..7128d867 100644 --- a/src/sys/socket/mod.rs +++ b/src/sys/socket/mod.rs @@ -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")] |