From 06eb8ffaadabebbc884ce6f6e90a8261866d9ca4 Mon Sep 17 00:00:00 2001 From: Todd Neal Date: Thu, 8 Dec 2022 03:58:34 +0000 Subject: fix: send ETH_P_ALL in htons format --- src/sys/socket/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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")] -- cgit v1.2.3