提交 1c011bed 编写于 作者: B Bart De Schuymer 提交者: David S. Miller

[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: NBart De Schuymer <bdschuym@pandora.be>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 de9daad9
...@@ -214,9 +214,11 @@ static int br_nf_pre_routing_finish(struct sk_buff *skb) ...@@ -214,9 +214,11 @@ static int br_nf_pre_routing_finish(struct sk_buff *skb)
.tos = RT_TOS(iph->tos)} }, .proto = 0}; .tos = RT_TOS(iph->tos)} }, .proto = 0};
if (!ip_route_output_key(&rt, &fl)) { if (!ip_route_output_key(&rt, &fl)) {
/* Bridged-and-DNAT'ed traffic doesn't /* - Bridged-and-DNAT'ed traffic doesn't
* require ip_forwarding. */ * require ip_forwarding.
if (((struct dst_entry *)rt)->dev == dev) { * - Deal with redirected traffic. */
if (((struct dst_entry *)rt)->dev == dev ||
rt->rt_type == RTN_LOCAL) {
skb->dst = (struct dst_entry *)rt; skb->dst = (struct dst_entry *)rt;
goto bridged_dnat; goto bridged_dnat;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册