Close tun fd when bringing down tunnel

This commit is contained in:
Jason A. Donenfeld 2018-02-18 22:54:33 +01:00
parent 519c5d200a
commit 09de7d1342

View file

@ -283,7 +283,7 @@ func (tun *NativeTun) Events() chan TUNEvent {
}
func (tun *NativeTun) Close() error {
return nil
return tun.fd.Close()
}
func CreateTUNFromFile(name string, fd *os.File) (TUNDevice, error) {