From: Thomas Graf Date: Wed, 30 Nov 2016 16:10:08 +0000 (+0100) Subject: route: Set orig_output when redirecting to lwt on locally generated traffic X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=11b3d9c5869bc96997cada33be6a56ebd179786b;p=openwrt%2Fstaging%2Fblogic.git route: Set orig_output when redirecting to lwt on locally generated traffic orig_output for IPv4 was only set for dsts which hit an input route. Set it consistently for locally generated traffic as well to allow lwt to continue the dst_output() path as configured by the nexthop. Fixes: 2536862311d ("lwt: Add support to redirect dst.input") Signed-off-by: Thomas Graf Signed-off-by: David S. Miller --- diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 6402d745d192..f09866327d70 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -2155,8 +2155,10 @@ add: } rt_set_nexthop(rth, fl4->daddr, res, fnhe, fi, type, 0); - if (lwtunnel_output_redirect(rth->dst.lwtstate)) + if (lwtunnel_output_redirect(rth->dst.lwtstate)) { + rth->dst.lwtstate->orig_output = rth->dst.output; rth->dst.output = lwtunnel_output; + } return rth; }