Skip to content

Commit 06eb8ff

Browse files
committed
fix: send ETH_P_ALL in htons format
1 parent b2318f9 commit 06eb8ff

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
3434
### Fixed
3535
- Fix `SockaddrIn6` bug that was swapping flowinfo and scope_id byte ordering.
3636
([#1964](https://github.com/nix-rust/nix/pull/1964))
37+
- Fix: send ETH_P_ALL in htons format
38+
([#1925](https://github.com/nix-rust/nix/pull/1925))
3739

3840
### Removed
3941

src/sys/socket/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ pub enum SockProtocol {
217217
// The protocol number is fed into the socket syscall in network byte order.
218218
#[cfg(any(target_os = "android", target_os = "linux"))]
219219
#[cfg_attr(docsrs, doc(cfg(all())))]
220-
EthAll = libc::ETH_P_ALL.to_be(),
220+
EthAll = (libc::ETH_P_ALL as u16).to_be() as i32,
221221
/// The Controller Area Network raw socket protocol
222222
/// ([ref](https://docs.kernel.org/networking/can.html#how-to-use-socketcan))
223223
#[cfg(target_os = "linux")]

0 commit comments

Comments
 (0)