diff options
author | David S. Miller <davem@davemloft.net> | 2015-03-10 16:48:47 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-10 16:48:47 (GMT) |
commit | 515fb5c317db991e2f9877936b3b21a35c1d3190 (patch) | |
tree | 93f05ff9459d6cae977bd468a6ba5a1f59f477ad /net/bridge/br_device.c | |
parent | 59e33c2b021322db92ca27c4d9958e57630443b6 (diff) | |
parent | 1a4ba64d16a42c1b31d52b671accd7f9103e2626 (diff) | |
download | linux-515fb5c317db991e2f9877936b3b21a35c1d3190.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next
Pablo Neira Ayuso says:
====================
Netfilter fixes for net-next
The following batch contains a couple of fixes to address some fallout
from the previous pull request, they are:
1) Address link problems in the bridge code after e5de75b. Fix it by
using rcu hook to address to avoid ifdef pollution and hard
dependency between bridge and br_netfilter.
2) Address sparse warnings in the netfilter reject code, patch from
Florian Westphal.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_device.c')
-rw-r--r-- | net/bridge/br_device.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c index 294cbcc..4ff77a1 100644 --- a/net/bridge/br_device.c +++ b/net/bridge/br_device.c @@ -25,6 +25,9 @@ #define COMMON_FEATURES (NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA | \ NETIF_F_GSO_MASK | NETIF_F_HW_CSUM) +const struct nf_br_ops __rcu *nf_br_ops __read_mostly; +EXPORT_SYMBOL_GPL(nf_br_ops); + /* net device transmit always called with BH disabled */ netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev) { @@ -33,10 +36,12 @@ netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev) struct net_bridge_fdb_entry *dst; struct net_bridge_mdb_entry *mdst; struct pcpu_sw_netstats *brstats = this_cpu_ptr(br->stats); + const struct nf_br_ops *nf_ops; u16 vid = 0; rcu_read_lock(); - if (br_nf_prerouting_finish_bridge(skb)) { + nf_ops = rcu_dereference(nf_br_ops); + if (nf_ops && nf_ops->br_dev_xmit_hook(skb)) { rcu_read_unlock(); return NETDEV_TX_OK; } |