summaryrefslogtreecommitdiffstats
path: root/net/ipv4/route.c
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2016-11-30 17:10:08 +0100
committerDavid S. Miller <davem@davemloft.net>2016-12-02 10:51:49 -0500
commit11b3d9c5869bc96997cada33be6a56ebd179786b (patch)
treed7b4fcfbf1a879ff57e94229e17db7b17e12800f /net/ipv4/route.c
parentee3d7c6e5b4d2615115aa857890923e3dcfa3852 (diff)
downloadlinux-11b3d9c5869bc96997cada33be6a56ebd179786b.tar.gz
linux-11b3d9c5869bc96997cada33be6a56ebd179786b.tar.bz2
linux-11b3d9c5869bc96997cada33be6a56ebd179786b.zip
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.c4
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;
}