meh / rust-tun

TUN device creation and handling.
340 stars 133 forks source link

Framed send fails with "Socket operation on non-socket" #48

Open nmldiegues opened 2 years ago

nmldiegues commented 2 years ago

Reproduced by using https://github.com/meh/rust-tun/blob/master/examples/ping-tun.rs

When I ping 10.0.0.2, that program gets an ICMP packet, and it tries to reply. At that point it fails in https://github.com/meh/rust-tun/blob/master/examples/ping-tun.rs#L66 with code 88, Socket operation on non-socket

This is happening on Linux Ubuntu 20.04 with Kernel 5.13.0-44 , in case that is relevant for reproducibility.

nmldiegues commented 2 years ago

Just noticed https://github.com/meh/rust-tun/issues/43 --- this is likely a duplicate, let me try that fix.

nmldiegues commented 2 years ago

Confirmed that #43 fixes this

Can the package be updated in https://crates.io/crates/tun ? Seems like it was last updated 10 months ago, and that release contains this bug.

yinheli commented 1 year ago

ping