aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-02-18 22:54:33 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2018-02-18 22:54:33 +0100
commit09de7d1342a6d069ee888370a9bdcc289fadc73b (patch)
treeb6386061aee97a85055a986500fb0f007677cb4b
parentFix timer typo (diff)
downloadwireguard-go-09de7d1342a6d069ee888370a9bdcc289fadc73b.tar.xz
wireguard-go-09de7d1342a6d069ee888370a9bdcc289fadc73b.zip
Close tun fd when bringing down tunnel
-rw-r--r--tun_linux.go2
1 files changed, 1 insertions, 1 deletions
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) {