net: ppp: reset nextseq counter when enabling SC_MULTILINK
Subsystems (3)
PATCH 1/1 net: ppp: reset nextseq counter when enabling SC_MULTILINK
From: Christoph Schulz <[email protected]>
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.
---
Note that the stock pppd does not yet support multilink PPP over a demand-dialled interface. I used a locally patched version for testing.
drivers/net/ppp/ppp_generic.c +2 -0
@@ -661,6 +661,8 @@ static long ppp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)break ;ppp_lock (ppp); cflags = ppp->flags & ~val; +if (!(ppp->flags &SC_MULTILINK ) && (val &SC_MULTILINK )) + ppp->nextseq =0 ; ppp->flags = val &SC_FLAG_BITS ;ppp_unlock (ppp);if (cflags &SC_CCP_OPEN )
From: Christoph Schulz <[email protected]>
Date: Tue, 15 Jul 2014 11:51:03 +0200
Quoted 8 lines
From: Christoph Schulz <[email protected]>
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_MULTILINKflag is set.
Quoted 4 lines
Signed-off-by Christoph Schulz <[email protected]>---
Note that the stock pppd does not yet support multilink PPP over a demand-dialled interface. I used a locally patched version for testing.
Applied, thanks Christoph.
Hello!
David Miller schrieb am Tue, 15 Jul 2014 22:52:59 -0700 (PDT):
Quoted 1 line
Applied, thanks Christoph.
Sorry, the extra code has to be surrounded by
#ifdef CONFIG_PPP_MULTILINK
...
#endif
I will submit an updated patch ASAP.
Best regards,
Christoph Schulz
Hello!
Christoph Schulz schrieb am Wed, 16 Jul 2014 23:19:50 +0200:
Quoted 1 line
I will submit an updated patch ASAP.
Sorry, how should I do it? Based on the *current* state of net-next, i.e. based on my original (but incomplete) patch? Or based on the net-next tree before my original patch was included?
Thank you in advance,
Christoph Schulz
David Miller
maintainerFrom: Christoph Schulz <[email protected]>
Date: Wed, 16 Jul 2014 23:24:43 +0200
Quoted 3 lines
Sorry, how should I do it? Based on the *current* state of net-next, i.e. based on my original (but incomplete) patch? Or based on the net-next tree before my original patch was included?
Based upon the current state of net-next, you're sending me a bug fix for the change you made.
Hello!
David Miller schrieb am Wed, 16 Jul 2014 14:27:54 -0700 (PDT):
Quoted 6 lines
Quoted 3 lines
Sorry, how should I do it? Based on the *current* state of net-next, i.e. based on my original (but incomplete) patch? Or based on the net-next tree before my original patch was included?
Based upon the current state of net-next, you're sending me a bug fix for the change you made.
Thank you for the clarification. I just sent the bugfix patch to the mailing list. Sorry for my first erroneous patch -- I have never tested the patch without CONFIG_PPP_MULTILINK being defined. At least I learned something for the future...
Regards,
Christoph Schulz
David Miller
maintainerFrom: Christoph Schulz <[email protected]>
Date: Wed, 16 Jul 2014 23:19:50 +0200
Quoted 1 line
I will submit an updated patch ASAP.
"updated patch" makes no sense in this context, your patch has been applied already. Therefore you have to submit a relative patch that fixes the problem.