Skip to content

Commit

Permalink
route: Set orig_output when redirecting to lwt on locally generated t…
Browse files Browse the repository at this point in the history
…raffic

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: 2536862 ("lwt: Add support to redirect dst.input")
Signed-off-by: Thomas Graf <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
tgraf authored and davem330 committed Dec 2, 2016
1 parent ee3d7c6 commit 11b3d9c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion net/ipv4/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -2155,8 +2155,10 @@ static struct rtable *__mkroute_output(const struct fib_result *res,
}

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;
}
Expand Down

0 comments on commit 11b3d9c

Please sign in to comment.