meh / rust-tun

TUN device creation and handling.
343 stars 136 forks source link

fake into_raw_fd() for Device #18

Closed kings-way closed 3 years ago

kings-way commented 4 years ago

Hey guys, it's good to have multiqueue support now, but it breaks trait IntoRawFd for Device. see here https://github.com/meh/rust-tun/blob/master/src/platform/linux/device.rs#L381

I think it may cause some trouble if someone calls into_raw_fd() to transfer the ownership of RawFd, cause when Device is dropped, the underlying fd will be closed.

meh commented 4 years ago

@jibi :panda_face: