You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rustc 1.67.0 is the first failing version for me and the problem could be related to rust-lang/rust#102750.
This leads to an error in pnet_datalink/src/linux.rs:124 as setsockopt receives the differently aligned struct and fails with "os error 19". In my case the IOCTL received 0 as the (invalid) device index.
Adding #[repr(C)] fixes the issue.
// man 7 packet#[repr(C)]pubstructpacket_mreq{pubmr_ifindex: libc::c_int,pubmr_type: libc::c_ushort,pubmr_alen: libc::c_ushort,pubmr_address:[libc::c_uchar;8],}
The text was updated successfully, but these errors were encountered:
With recent rustc versions the memory layout of
packet_mreq
pnet_datalink/src/bindings/linux.rs:32 has changed.Rustc 1.67.0 is the first failing version for me and the problem could be related to rust-lang/rust#102750.
This leads to an error in pnet_datalink/src/linux.rs:124 as
setsockopt
receives the differently aligned struct and fails with "os error 19". In my case the IOCTL received 0 as the (invalid) device index.Adding
#[repr(C)]
fixes the issue.The text was updated successfully, but these errors were encountered: