]> git.ipfire.org Git - thirdparty/wireguard-go.git/commitdiff
Close tun fd when bringing down tunnel
authorJason A. Donenfeld <Jason@zx2c4.com>
Sun, 18 Feb 2018 21:54:33 +0000 (22:54 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Sun, 18 Feb 2018 21:54:33 +0000 (22:54 +0100)
tun_linux.go

index b35e08db52b5bfa8f5ec600560df454a9a8f72d0..97973a73f8087ae8f7a5101639ef610b2cd4469f 100644 (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) {