]> git.ipfire.org Git - thirdparty/wireguard-go.git/commitdiff
No zero sequence numbers
authorJason A. Donenfeld <Jason@zx2c4.com>
Wed, 23 May 2018 16:30:55 +0000 (18:30 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Wed, 23 May 2018 16:30:55 +0000 (18:30 +0200)
conn_linux.go

index fe30afba4ce394540b3a9b75be01356ba7a49b3e..3447f3a0af7bcffabff0a764b3ccc1f04fb1c156 100644 (file)
@@ -584,7 +584,7 @@ func (bind *NativeBind) routineRouteListener(device *Device) {
 
                        switch hdr.Type {
                        case unix.RTM_NEWROUTE, unix.RTM_DELROUTE:
-                               if hdr.Seq <= MaxPeers {
+                               if hdr.Seq <= MaxPeers && hdr.Seq > 0 {
                                        if uint(len(remain)) < uint(hdr.Len) {
                                                break
                                        }