Herbert Xu wrote:
[BRIDGE]: Unshare skb upon entry

Due to the special location of the bridging hook, it should never see a
shared packet anyway (certainly not with any in-kernel code).  So it
makes sense to unshare the skb there if necessary as that will greatly
simplify the code below it (in particular, netfilter).


I guess we can remove the unsharing from br_netfilter.c now.

Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]>


diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
index 246bf23..da22f90 100644
--- a/net/bridge/br_netfilter.c
+++ b/net/bridge/br_netfilter.c
@@ -511,9 +511,6 @@ static unsigned int br_nf_pre_routing(unsigned int hook, 
struct sk_buff *skb,
        struct iphdr *iph;
        __u32 len = nf_bridge_encap_header_len(skb);
 
-       if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL)
-               return NF_STOLEN;
-
        if (unlikely(!pskb_may_pull(skb, len)))
                goto out;
 

Reply via email to