summaryrefslogtreecommitdiffstats
path: root/net/bridge
diff options
context:
space:
mode:
authorBart De Schuymer <bdschuym@pandora.be>2005-09-14 20:55:16 -0700
committerDavid S. Miller <davem@davemloft.net>2005-09-14 20:55:16 -0700
commit1c011bed5f49ce9e6193b18b226106a41ecfa95c (patch)
tree227370f5244359d3f52c57859f1e91754c8adf37 /net/bridge
parentde9daad90ecb54f3c37c3f8967d581e20d927539 (diff)
downloadlinux-1c011bed5f49ce9e6193b18b226106a41ecfa95c.tar.bz2
[BRIDGE-NF]: Fix iptables redirect on bridge interface
Here's a slightly altered patch, originally from Mark Glines who diagnosed and fixed the problem. Signed-off-by: Bart De Schuymer <bdschuym@pandora.be> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r--net/bridge/br_netfilter.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
index 2d52fee63a8c..d8e36b775125 100644
--- a/net/bridge/br_netfilter.c
+++ b/net/bridge/br_netfilter.c
@@ -214,9 +214,11 @@ static int br_nf_pre_routing_finish(struct sk_buff *skb)
.tos = RT_TOS(iph->tos)} }, .proto = 0};
if (!ip_route_output_key(&rt, &fl)) {
- /* Bridged-and-DNAT'ed traffic doesn't
- * require ip_forwarding. */
- if (((struct dst_entry *)rt)->dev == dev) {
+ /* - Bridged-and-DNAT'ed traffic doesn't
+ * require ip_forwarding.
+ * - Deal with redirected traffic. */
+ if (((struct dst_entry *)rt)->dev == dev ||
+ rt->rt_type == RTN_LOCAL) {
skb->dst = (struct dst_entry *)rt;
goto bridged_dnat;
}