From: Christoph Schulz <develop@kristov.de>
To: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Cc: linux-ppp@vger.kernel.org, Paul Mackerras <paulus@samba.org>
Subject: [PATCH net-next 1/1] net: ppp: reset nextseq counter when enabling SC_MULTILINK
Date: Tue, 15 Jul 2014 09:51:03 +0000 [thread overview]
Message-ID: <53C4F987.1040401@kristov.de> (raw)
From: Christoph Schulz <develop@kristov.de>
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>
---
Note that the stock pppd does not yet support multilink PPP over a
demand-dialled interface. I used a locally patched version for testing.
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
index 91d6c12..a0aae43 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)
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)
WARNING: multiple messages have this Message-ID (diff)
From: Christoph Schulz <develop@kristov.de>
To: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Cc: linux-ppp@vger.kernel.org, Paul Mackerras <paulus@samba.org>
Subject: [PATCH net-next 1/1] net: ppp: reset nextseq counter when enabling SC_MULTILINK
Date: Tue, 15 Jul 2014 11:51:03 +0200 [thread overview]
Message-ID: <53C4F987.1040401@kristov.de> (raw)
From: Christoph Schulz <develop@kristov.de>
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>
---
Note that the stock pppd does not yet support multilink PPP over a
demand-dialled interface. I used a locally patched version for testing.
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
index 91d6c12..a0aae43 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)
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)
next reply other threads:[~2014-07-15 9:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-15 9:51 Christoph Schulz [this message]
2014-07-15 9:51 ` [PATCH net-next 1/1] net: ppp: reset nextseq counter when enabling SC_MULTILINK Christoph Schulz
2014-07-16 5:52 ` David Miller
2014-07-16 5:52 ` David Miller
2014-07-16 21:19 ` Christoph Schulz
2014-07-16 21:19 ` Christoph Schulz
2014-07-16 21:24 ` Christoph Schulz
2014-07-16 21:24 ` Christoph Schulz
2014-07-16 21:27 ` David Miller
2014-07-16 21:27 ` David Miller
2014-07-16 21:48 ` Christoph Schulz
2014-07-16 21:48 ` Christoph Schulz
2014-07-16 21:27 ` David Miller
2014-07-16 21:27 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53C4F987.1040401@kristov.de \
--to=develop@kristov.de \
--cc=linux-ppp@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.