aboutsummaryrefslogtreecommitdiffstats
path: root/tun_linux.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-04-27 05:21:45 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-04-27 05:41:07 +0200
commitb34604245ec4dfb50846d0ba28d022be5b756c25 (patch)
tree5a175eeabada57b652189db8a576cb136ff3e4a0 /tun_linux.go
parentFix error handling and cleanup of netlink listener (diff)
downloadwireguard-go-b34604245ec4dfb50846d0ba28d022be5b756c25.tar.xz
wireguard-go-b34604245ec4dfb50846d0ba28d022be5b756c25.zip
Clear src cache if route changes to new ifindex
Diffstat (limited to '')
-rw-r--r--tun_linux.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/tun_linux.go b/tun_linux.go
index 0672b5e..b0ffa00 100644
--- a/tun_linux.go
+++ b/tun_linux.go
@@ -79,7 +79,6 @@ func (tun *NativeTun) RoutineNetlinkListener() {
defer unix.Close(sock)
saddr := &unix.SockaddrNetlink{
Family: unix.AF_NETLINK,
- Pid: uint32(os.Getpid()),
Groups: uint32(groups),
}
err = unix.Bind(sock, saddr)
@@ -90,7 +89,9 @@ func (tun *NativeTun) RoutineNetlinkListener() {
// TODO: This function never actually exits in response to anything,
// a go routine that goes forever. We'll want to fix that if this is
- // to ever be used as any sort of library.
+ // to ever be used as any sort of library. See what we've done with
+ // calling shutdown() on the netlink socket in conn_linux.go, and
+ // change this to be more like that.
for msg := make([]byte, 1<<16); ; {