aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ppp
diff options
context:
space:
mode:
authorChristoph Schulz <develop@kristov.de>2014-07-15 05:51:03 -0400
committerDavid S. Miller <davem@davemloft.net>2014-07-16 01:52:35 -0400
commitd762d038497c9df51c19fcbe69b094b3bf8e5568 (patch)
tree596b35ccd321b8bf3ac51e339fd46e09e61450d5 /drivers/net/ppp
parentc8ad0f298cb8bf2283c72873b6d62797e65343b4 (diff)
net: ppp: reset nextseq counter when enabling SC_MULTILINK
If using a demand-dialled PPP unit for a PPP multilink master, the pppd daemon needs to reset the sequence counter between two connections. This allows the daemon to reuse the PPP unit instead of destroying and recreating it. As there is no API to reset the counter, this patch resets the counter whenever the SC_MULTILINK flag is set. Signed-off-by: Christoph Schulz <develop@kristov.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ppp')
-rw-r--r--drivers/net/ppp/ppp_generic.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
index 5c002b1ef169..c38ee903bd59 100644
--- a/drivers/net/ppp/ppp_generic.c
+++ b/drivers/net/ppp/ppp_generic.c
@@ -661,6 +661,8 @@ static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
661 break; 661 break;
662 ppp_lock(ppp); 662 ppp_lock(ppp);
663 cflags = ppp->flags & ~val; 663 cflags = ppp->flags & ~val;
664 if (!(ppp->flags & SC_MULTILINK) && (val & SC_MULTILINK))
665 ppp->nextseq = 0;
664 ppp->flags = val & SC_FLAG_BITS; 666 ppp->flags = val & SC_FLAG_BITS;
665 ppp_unlock(ppp); 667 ppp_unlock(ppp);
666 if (cflags & SC_CCP_OPEN) 668 if (cflags & SC_CCP_OPEN)