diff options
author | Thomas Graf <tgraf@suug.ch> | 2016-11-30 17:10:08 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-12-02 10:51:49 -0500 |
commit | 11b3d9c5869bc96997cada33be6a56ebd179786b (patch) | |
tree | d7b4fcfbf1a879ff57e94229e17db7b17e12800f /net/ipv4/route.c | |
parent | ee3d7c6e5b4d2615115aa857890923e3dcfa3852 (diff) |
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 <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r-- | net/ipv4/route.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; } |