diff options
author | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2017-08-22 14:57:32 +0200 |
---|---|---|
committer | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2017-08-22 14:57:32 +0200 |
commit | c6d03ef17f34f7380d95e91a6091a06bce332979 (patch) | |
tree | 475cf096e8fd45b8787c1e7b9ecff90880edb043 /src/tun_linux.go | |
parent | 04640eb629f9c6a7bd4561f2a2f5b07195aa6009 (diff) |
Update MTU based on netlink messages (linux)
Diffstat (limited to 'src/tun_linux.go')
-rw-r--r-- | src/tun_linux.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tun_linux.go b/src/tun_linux.go index e752733..b9541c9 100644 --- a/src/tun_linux.go +++ b/src/tun_linux.go @@ -85,6 +85,7 @@ func (tun *NativeTun) RoutineNetlinkListener() { case unix.RTM_NEWLINK: info := *(*unix.IfInfomsg)(unsafe.Pointer(&remain[unix.SizeofNlMsghdr])) + remain = remain[hdr.Len:] if info.Index != tun.index { // not our interface @@ -99,7 +100,7 @@ func (tun *NativeTun) RoutineNetlinkListener() { tun.events <- TUNEventDown } - remain = remain[hdr.Len:] + tun.events <- TUNEventMTUUpdate default: remain = remain[hdr.Len:] |