[PATCH] pppoe: Missed check for destination addr in PADT frame processing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 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@xxxxxxxxx>
---

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) {
--
--
To unsubscribe from this list: send the line "unsubscribe linux-ppp" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Audio Users]     [Linux for Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Fedora Users]

  Powered by Linux