From b5a60ddb7ec1fe6cbbb055a4296b3ea86bd913c4 Mon Sep 17 00:00:00 2001 From: Archie Cobbs Date: Wed, 13 Feb 2002 00:58:49 +0000 Subject: [PATCH] Fix another bug in handling of multi-link sequence numbers. MFC after: 1 week --- sys/netgraph/ng_ppp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/netgraph/ng_ppp.c b/sys/netgraph/ng_ppp.c index 5cc71bafb9cf..3bd569dd6ca5 100644 --- a/sys/netgraph/ng_ppp.c +++ b/sys/netgraph/ng_ppp.c @@ -118,9 +118,10 @@ MALLOC_DEFINE(M_NETGRAPH_PPP, "netgraph_ppp", "netgraph ppp node"); MP_LONG_SEQ_DIFF((x), (y))) /* Increment receive sequence number */ -#define MP_NEXT_RECV_SEQ(priv,seq) \ - (((seq) + 1) & ((priv)->conf.recvShortSeq ? \ - MP_SHORT_SEQ_MASK : MP_LONG_SEQ_MASK)) +#define MP_NEXT_RECV_SEQ(priv,seq) \ + ((priv)->conf.recvShortSeq ? \ + MP_SHORT_EXTEND((seq) + 1) : \ + MP_LONG_EXTEND((seq) + 1)) /* Don't fragment transmitted packets smaller than this */ #define MP_MIN_FRAG_LEN 6