Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1c011bed authored by Bart De Schuymer's avatar Bart De Schuymer Committed by David S. Miller
Browse files

[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: default avatarBart De Schuymer <bdschuym@pandora.be>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent de9daad9
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -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;
				}