diff --git a/src/phy/sys/bpf.rs b/src/phy/sys/bpf.rs index 1935ac3fc..7e65b982a 100644 --- a/src/phy/sys/bpf.rs +++ b/src/phy/sys/bpf.rs @@ -57,7 +57,10 @@ fn open_device() -> io::Result { unsafe { for i in 0..256 { let dev = format!("/dev/bpf{}\0", i); - match libc::open(dev.as_ptr() as *const libc::c_char, libc::O_RDWR) { + match libc::open( + dev.as_ptr() as *const libc::c_char, + libc::O_RDWR | libc::O_NONBLOCK, + ) { -1 => continue, fd => return Ok(fd), };