]> git.hungrycats.org Git - linux/commitdiff
[PPP]: Fix PPP Deflate sequence number checking
authorPaul Mackerras <paulus@samba.org>
Thu, 12 Jun 2003 10:52:06 +0000 (03:52 -0700)
committerDavid S. Miller <davem@nuts.ninka.net>
Thu, 12 Jun 2003 10:52:06 +0000 (03:52 -0700)
drivers/net/ppp_deflate.c

index 14657acad57178e2718b5d37183e24270c5b5ead..7b029939be24a7b721b2fb46c8f77f7ec09ac598 100644 (file)
@@ -456,10 +456,10 @@ int z_decompress(void *arg, unsigned char *ibuf, int isize,
 
        /* Check the sequence number. */
        seq = (ibuf[PPP_HDRLEN] << 8) + ibuf[PPP_HDRLEN+1];
-       if (seq != state->seqno) {
+       if (seq != (state->seqno & 0xffff)) {
                if (state->debug)
                        printk(KERN_DEBUG "z_decompress%d: bad seq # %d, expected %d\n",
-                              state->unit, seq, state->seqno);
+                              state->unit, seq, state->seqno & 0xffff);
                return DECOMP_ERROR;
        }
        ++state->seqno;