]> err.no Git - linux-2.6/blobdiff - net/llc/llc_input.c
[NET]: net.ipv4.ip_autoconfig sysctl removal
[linux-2.6] / net / llc / llc_input.c
index d62e0f9b9da3edca21a8292bc321764aa1866187..94d2368ade92c6368eec7121e26b2dbea4e04a65 100644 (file)
@@ -142,6 +142,8 @@ int llc_rcv(struct sk_buff *skb, struct net_device *dev,
        struct llc_sap *sap;
        struct llc_pdu_sn *pdu;
        int dest;
+       int (*rcv)(struct sk_buff *, struct net_device *,
+                  struct packet_type *, struct net_device *);
 
        /*
         * When the interface is in promisc. mode, drop all the crap that it
@@ -169,9 +171,11 @@ int llc_rcv(struct sk_buff *skb, struct net_device *dev,
         * First the upper layer protocols that don't need the full
         * LLC functionality
         */
-       if (sap->rcv_func) {
-               sap->rcv_func(skb, dev, pt, orig_dev);
-               goto out_put;
+       rcv = rcu_dereference(sap->rcv_func);
+       if (rcv) {
+               struct sk_buff *cskb = skb_clone(skb, GFP_ATOMIC);
+               if (cskb)
+                       rcv(cskb, dev, pt, orig_dev);
        }
        dest = llc_pdu_type(skb);
        if (unlikely(!dest || !llc_type_handlers[dest - 1]))