From: Benjamin LaHaise <bcrl@kvack.org>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, linux-ppp@vger.kernel.org
Subject: [PATCH next-next] ppp: change default for incoming protocol filter to NPMODE_DROP
Date: Tue, 3 Jul 2012 21:32:58 -0400 [thread overview]
Message-ID: <20120704013258.GA26225@kvack.org> (raw)
By default, the ppp_generic code initializes the npmode array that filters
incoming packet to accept packets for all protocols. This behaviour is
incorrect, as it results in packets for protocols that an older version
of a PPP implementation may not be aware of to be incorrectly accepted.
This behaviour is visible, for example, when sending IPv6 packets across a
ppp link where pppd has only been configured to use IPv4.
This change should be safe since pppd will correctly set the protocols it
negotiates to NPMODE_PASS as the appropriate protocols transition to an Up
state.
Signed-off-by: Benjamin LaHaise <bcrl@kvack.org>
---
drivers/net/ppp/ppp_generic.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
index 5c05572..404ac50 100644
--- a/drivers/net/ppp/ppp_generic.c
+++ b/drivers/net/ppp/ppp_generic.c
@@ -2619,7 +2619,7 @@ ppp_create_interface(struct net *net, int unit, int *retp)
init_ppp_file(&ppp->file, INTERFACE);
ppp->file.hdrlen = PPP_HDRLEN - 2; /* don't count proto bytes */
for (i = 0; i < NUM_NP; ++i)
- ppp->npmode[i] = NPMODE_PASS;
+ ppp->npmode[i] = NPMODE_DROP;
INIT_LIST_HEAD(&ppp->channels);
spin_lock_init(&ppp->rlock);
spin_lock_init(&ppp->wlock);
--
1.7.4.1
--
"Thought is the essence of where you are now."
next reply other threads:[~2012-07-04 1:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-04 1:32 Benjamin LaHaise [this message]
2012-07-05 10:00 ` [PATCH next-next] ppp: change default for incoming protocol filter to NPMODE_DROP David Miller
2012-07-06 17:28 ` Benjamin LaHaise
2012-07-07 23:15 ` David Miller
2012-07-08 0:38 ` Benjamin LaHaise
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=20120704013258.GA26225@kvack.org \
--to=bcrl@kvack.org \
--cc=davem@davemloft.net \
--cc=linux-ppp@vger.kernel.org \
--cc=netdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).