]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/bridge/br_device.c
Merge branch 'master' of /repos/git/net-next-2.6
[net-next-2.6.git] / net / bridge / br_device.c
index 074c59690fc56e803d625af57629275fefb65889..f15f9c4a0dd2d17719c58d18ce66b4a2b763503b 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/etherdevice.h>
 #include <linux/ethtool.h>
 #include <linux/list.h>
+#include <linux/netfilter_bridge.h>
 
 #include <asm/uaccess.h>
 #include "br_private.h"
@@ -30,6 +31,13 @@ netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
        struct net_bridge_mdb_entry *mdst;
        struct br_cpu_netstats *brstats = this_cpu_ptr(br->stats);
 
+#ifdef CONFIG_BRIDGE_NETFILTER
+       if (skb->nf_bridge && (skb->nf_bridge->mask & BRNF_BRIDGED_DNAT)) {
+               br_nf_pre_routing_finish_bridge_slow(skb);
+               return NETDEV_TX_OK;
+       }
+#endif
+
        brstats->tx_packets++;
        brstats->tx_bytes += skb->len;