From 09de7d1342a6d069ee888370a9bdcc289fadc73b Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sun, 18 Feb 2018 22:54:33 +0100 Subject: [PATCH] Close tun fd when bringing down tunnel --- tun_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tun_linux.go b/tun_linux.go index b35e08d..97973a7 100644 --- a/tun_linux.go +++ b/tun_linux.go @@ -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) {