]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/bridge/br_input.c
Merge branch 'upstream-jeff' of git://git.kernel.org/pub/scm/linux/kernel/git/romieu...
[linux-2.6-omap-h63xx.git] / net / bridge / br_input.c
index 3a8a015c92e0d49a29d7e0b4e686fb78135529b7..3cedd4eeeed6f30826c671a4e0cfd5575fc88a51 100644 (file)
@@ -126,6 +126,10 @@ struct sk_buff *br_handle_frame(struct net_bridge_port *p, struct sk_buff *skb)
        if (!is_valid_ether_addr(eth_hdr(skb)->h_source))
                goto drop;
 
+       skb = skb_share_check(skb, GFP_ATOMIC);
+       if (!skb)
+               return NULL;
+
        if (unlikely(is_link_local(dest))) {
                /* Pause frames shouldn't be passed up by driver anyway */
                if (skb->protocol == htons(ETH_P_PAUSE))
@@ -145,7 +149,7 @@ struct sk_buff *br_handle_frame(struct net_bridge_port *p, struct sk_buff *skb)
        case BR_STATE_FORWARDING:
 
                if (br_should_route_hook) {
-                       if (br_should_route_hook(&skb))
+                       if (br_should_route_hook(skb))
                                return skb;
                        dest = eth_hdr(skb)->h_dest;
                }