aboutsummaryrefslogtreecommitdiffstats
path: root/net/llc/llc_input.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2006-05-25 18:10:02 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-06-18 00:26:06 -0400
commit8f182b494f87799d6ae20a1401825c516da46081 (patch)
tree509fc735e59cb1094cd68029a9e0a4b9a9a01e86 /net/llc/llc_input.c
parent23dbe7912dad6be71bb9e69cb819d05e2442d362 (diff)
[LLC]: allow applications to get copy of kernel datagrams
It is legal for an application to bind to a SAP that is also being used by the kernel. This happens if the bridge module binds to the STP SAP, and the user wants to have a daemon for STP as well. It is possible to have kernel doing STP on one bridge, but let application do RSTP on another bridge. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/llc/llc_input.c')
-rw-r--r--net/llc/llc_input.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/llc/llc_input.c b/net/llc/llc_input.c
index cb9f7f058f75..32cf8ac8ea80 100644
--- a/net/llc/llc_input.c
+++ b/net/llc/llc_input.c
@@ -173,8 +173,10 @@ int llc_rcv(struct sk_buff *skb, struct net_device *dev,
173 */ 173 */
174 rcv = rcu_dereference(sap->rcv_func); 174 rcv = rcu_dereference(sap->rcv_func);
175 if (rcv) { 175 if (rcv) {
176 struct sk_buff *cskb = skb_clone(skb, GFP_ATOMIC);
177 if (cskb)
178 rcv(cskb, dev, pt, orig_dev);
176 rcv(skb, dev, pt, orig_dev); 179 rcv(skb, dev, pt, orig_dev);
177 goto out_put;
178 } 180 }
179 dest = llc_pdu_type(skb); 181 dest = llc_pdu_type(skb);
180 if (unlikely(!dest || !llc_type_handlers[dest - 1])) 182 if (unlikely(!dest || !llc_type_handlers[dest - 1]))