net: convert bridge_nf to use skb extension infrastructure
This converts the bridge netfilter (calling iptables hooks from bridge) facility to use the extension infrastructure. The bridge_nf specific hooks in skb clone and free paths are removed, they have been replaced by the skb_ext hooks that do the same as the bridge nf allocations hooks did. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
df5042f4c5
commit
de8bda1d22
@@ -6,12 +6,12 @@
|
||||
|
||||
static inline struct nf_bridge_info *nf_bridge_alloc(struct sk_buff *skb)
|
||||
{
|
||||
skb->nf_bridge = kzalloc(sizeof(struct nf_bridge_info), GFP_ATOMIC);
|
||||
struct nf_bridge_info *b = skb_ext_add(skb, SKB_EXT_BRIDGE_NF);
|
||||
|
||||
if (likely(skb->nf_bridge))
|
||||
refcount_set(&(skb->nf_bridge->use), 1);
|
||||
if (b)
|
||||
memset(b, 0, sizeof(*b));
|
||||
|
||||
return skb->nf_bridge;
|
||||
return b;
|
||||
}
|
||||
|
||||
void nf_bridge_update_protocol(struct sk_buff *skb);
|
||||
|
Reference in New Issue
Block a user