linux-ppp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pppoe: Missed check for destination addr in PADT frame processing
@ 2010-10-13 12:33 Leonid Lisovskiy
  2010-10-15 10:32 ` Leonid Lisovskiy
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Leonid Lisovskiy @ 2010-10-13 12:33 UTC (permalink / raw)
  To: linux-ppp

 One of our customer encountered sporadic disconnects problem with
his ISP when using kernel PPPoE driver. After some investigation, we
discovered that it happens due to PADT frames being received with
destination MAC not matching the client MAC even though they have
proper source MAC and session_id. It seems that these ISP use very
cheap equipment that doesn't provide generation of unique
session_id's. User-space rp-pppoe 3.10 works correctly in this case
since it has an additional check for destination MAC in PADT frame
processing.

This patch adds check for destination MAC address in pppoe_disc_rcv().

Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
---

Tested on one buggy ISP (R-telekom, Kirov, Russia).

 drivers/net/pppoe.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/drivers/net/pppoe.c
+++ b/drivers/net/pppoe.c
@@ -485,6 +485,10 @@ static int pppoe_disc_rcv(struct sk_buff
 	if (ph->code != PADT_CODE)
 		goto abort;

+	/* Ignore PADT packets whose destination address isn't ours */
+	if (memcmp(eth_hdr(skb)->h_dest, dev->dev_addr, ETH_ALEN))
+		goto abort;
+
 	pn = pppoe_pernet(dev_net(dev));
 	po = get_item(pn, ph->sid, eth_hdr(skb)->h_source, dev->ifindex);
 	if (po) {
--

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-10-15 13:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-13 12:33 [PATCH] pppoe: Missed check for destination addr in PADT frame processing Leonid Lisovskiy
2010-10-15 10:32 ` Leonid Lisovskiy
2010-10-15 10:34 ` Sujit K M
2010-10-15 10:51 ` Sujit K M
2010-10-15 11:11 ` Leonid Lisovskiy
2010-10-15 11:49 ` [PATCH] pppoe: Missed check for destination addr in PADT frame James Carlson
2010-10-15 12:38 ` [PATCH] pppoe: Missed check for destination addr in PADT frame processing Leonid Lisovskiy
2010-10-15 13:31 ` [PATCH] pppoe: Missed check for destination addr in PADT frame James Carlson

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).