From: Jason A. Donenfeld Date: Sun, 18 Feb 2018 21:54:33 +0000 (+0100) Subject: Close tun fd when bringing down tunnel X-Git-Tag: 0.0.20180514~63 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09de7d1342a6d069ee888370a9bdcc289fadc73b;p=thirdparty%2Fwireguard-go.git Close tun fd when bringing down tunnel --- 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) {