diff options
author | Bart De Schuymer <bdschuym@pandora.be> | 2010-04-15 06:14:51 -0400 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2010-04-15 06:14:51 -0400 |
commit | ea2d9b41bd418894d1ee25de1642c3325d71c397 (patch) | |
tree | e8187786c8d83123da104476fc0eb7132ec29045 /net/bridge/br_device.c | |
parent | 9c6eb28aca52d562f3ffbaebaa56385df9972a43 (diff) |
netfilter: bridge-netfilter: simplify IP DNAT
Remove br_netfilter.c::br_nf_local_out(). The function
br_nf_local_out() was needed because the PF_BRIDGE::LOCAL_OUT hook
could be called when IP DNAT happens on to-be-bridged traffic. The
new scheme eliminates this mess.
Signed-off-by: Bart De Schuymer <bdschuym@pandora.be>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/bridge/br_device.c')
-rw-r--r-- | net/bridge/br_device.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c index 5b8a6e73b02f..007bde87415d 100644 --- a/net/bridge/br_device.c +++ b/net/bridge/br_device.c | |||
@@ -15,7 +15,7 @@ | |||
15 | #include <linux/netdevice.h> | 15 | #include <linux/netdevice.h> |
16 | #include <linux/etherdevice.h> | 16 | #include <linux/etherdevice.h> |
17 | #include <linux/ethtool.h> | 17 | #include <linux/ethtool.h> |
18 | 18 | #include <linux/netfilter_bridge.h> | |
19 | #include <asm/uaccess.h> | 19 | #include <asm/uaccess.h> |
20 | #include "br_private.h" | 20 | #include "br_private.h" |
21 | 21 | ||
@@ -28,6 +28,13 @@ netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev) | |||
28 | struct net_bridge_mdb_entry *mdst; | 28 | struct net_bridge_mdb_entry *mdst; |
29 | struct br_cpu_netstats *brstats = this_cpu_ptr(br->stats); | 29 | struct br_cpu_netstats *brstats = this_cpu_ptr(br->stats); |
30 | 30 | ||
31 | #ifdef CONFIG_BRIDGE_NETFILTER | ||
32 | if (skb->nf_bridge && (skb->nf_bridge->mask & BRNF_BRIDGED_DNAT)) { | ||
33 | br_nf_pre_routing_finish_bridge_slow(skb); | ||
34 | return NETDEV_TX_OK; | ||
35 | } | ||
36 | #endif | ||
37 | |||
31 | brstats->tx_packets++; | 38 | brstats->tx_packets++; |
32 | brstats->tx_bytes += skb->len; | 39 | brstats->tx_bytes += skb->len; |
33 | 40 | ||