diff options
author | Florian Westphal <fw@strlen.de> | 2018-12-18 17:15:17 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-12-19 11:21:37 -0800 |
commit | de8bda1d22d38b7d5cd08b33f86efd94d4c86630 (patch) | |
tree | 7acdf2397b31eb8b1601c9183ef30b8ebbe8400a /include/net | |
parent | df5042f4c5b9326c593bf2e31ed859ebc3b4130a (diff) | |
download | linux-stable-de8bda1d22d38b7d5cd08b33f86efd94d4c86630.tar.gz linux-stable-de8bda1d22d38b7d5cd08b33f86efd94d4c86630.tar.bz2 linux-stable-de8bda1d22d38b7d5cd08b33f86efd94d4c86630.zip |
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>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/netfilter/br_netfilter.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/net/netfilter/br_netfilter.h b/include/net/netfilter/br_netfilter.h index 6efc0153987b..4cd56808ac4e 100644 --- a/include/net/netfilter/br_netfilter.h +++ b/include/net/netfilter/br_netfilter.h @@ -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); |