Skip to content

Commit

Permalink
net: ppp: access ppp->nextseq only if CONFIG_PPP_MULTILINK is defined
Browse files Browse the repository at this point in the history
Commit d762d03 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: Christoph Schulz <develop@kristov.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Christoph Schulz authored and David S. Miller committed Jul 16, 2014
1 parent ed410ec commit a9f559c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ppp/ppp_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -655,8 +655,10 @@ static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
break;
ppp_lock(ppp);
cflags = ppp->flags & ~val;
#ifdef CONFIG_PPP_MULTILINK
if (!(ppp->flags & SC_MULTILINK) && (val & SC_MULTILINK))
ppp->nextseq = 0;
#endif
ppp->flags = val & SC_FLAG_BITS;
ppp_unlock(ppp);
if (cflags & SC_CCP_OPEN)
Expand Down

0 comments on commit a9f559c

Please sign in to comment.