Subject: [PATCH] llc: multicast receive device match

From: Stephen Hemminger <[email-masked]>
Date: Thu, 3 Aug 2006 10:05:58 -0700

Fix from [email-masked], STP packets are incorrectly received on all
LLC datagram sockets, whichever interface they are bound to. 
The llc_sap datagram receive logic sends packets with a unicast destination 
MAC to one socket bound to that SAP and MAC, and multicast packets to all sockets
bound to that SAP. STP packets are multicast, and we do need to know
on which interface they were received.

Signed-off-by: Stephen Hemminger <[email-masked]>
---
 net/llc/llc_sap.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/net/llc/llc_sap.c b/net/llc/llc_sap.c
index 42eb0c3..61cb8cf 100644
--- a/net/llc/llc_sap.c
+++ b/net/llc/llc_sap.c
@@ -330,6 +330,9 @@ static void llc_sap_mcast(struct llc_sap
 		if (llc->laddr.lsap != laddr->lsap)
 			continue;
 
+		if (llc->dev != skb->dev)
+			continue;
+
 		skb1 = skb_clone(skb, GFP_ATOMIC);
 		if (!skb1)
 			break;
-- 
1.4.0

--