From b34604245ec4dfb50846d0ba28d022be5b756c25 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 27 Apr 2018 05:21:45 +0200 Subject: Clear src cache if route changes to new ifindex --- tun_linux.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tun_linux.go') 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); ; { -- cgit v1.2.3-59-g8ed1b