Commit a9f559c3 authored by Christoph Schulz's avatar Christoph Schulz Committed by David S. Miller

net: ppp: access ppp->nextseq only if CONFIG_PPP_MULTILINK is defined

Commit d762d038 resets the counter holding the
next sequence number for multilink PPP fragments to zero whenever the
SC_MULTILINK flag is set. However, this counter only exists if
CONFIG_PPP_MULTILINK is defined. Consequently, the new code has to be enclosed
within #ifdef CONFIG_PPP_MULTILINK ... #endif.
Signed-off-by: default avatarChristoph Schulz <develop@kristov.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ed410ecf
...@@ -655,8 +655,10 @@ static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg) ...@@ -655,8 +655,10 @@ static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
break; break;
ppp_lock(ppp); ppp_lock(ppp);
cflags = ppp->flags & ~val; cflags = ppp->flags & ~val;
#ifdef CONFIG_PPP_MULTILINK
if (!(ppp->flags & SC_MULTILINK) && (val & SC_MULTILINK)) if (!(ppp->flags & SC_MULTILINK) && (val & SC_MULTILINK))
ppp->nextseq = 0; ppp->nextseq = 0;
#endif
ppp->flags = val & SC_FLAG_BITS; ppp->flags = val & SC_FLAG_BITS;
ppp_unlock(ppp); ppp_unlock(ppp);
if (cflags & SC_CCP_OPEN) if (cflags & SC_CCP_OPEN)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment