Close the tun fd when closing the device
This patch was part of the android development, as this is not specific to android, here is an independent patch.
PATCH 1/1 Close the tun fd when closing the device
We also need to listen to the stop signal in the read tun function to avoid reading a close tun device.
Signed-off-by Aurélien Chabot <[email protected]>
--- src/device.go | 1 + src/send.go | 77 ++++++++++++++++++++++++++++++++--------------------------- 2 files changed, 43 insertions(+), 35 deletions(-)
src/device.go +1 -0
@@ -205,6 +205,7 @@ func (device *Device) Close() { device.RemoveAllPeers() close(device.signal.stop) closeUDPConn(device) + device.tun.device.Close() } func (device *Device) WaitChannel() chan struct{} {
src/send.go +42 -35
95 lines not on this page · raw message
Signature · 1 line
2.15.0
Quoted 2 lines · Aurélien Chabot
This patch was part of the android development, as this is not specific to android, here is an independent patch.
You forgot to attach the patch.. :)
Cheers,
Georg
Quoted 5 lines · Georg Faerber
Quoted 2 lines · Aurélien Chabot
This patch was part of the android development, as this is not specific to android, here is an independent patch.
You forgot to attach the patch.. :)
Sorry for the noise! :x