Skip to content

Commit 11b3d9c

Browse files
tgrafdavem330
authored andcommitted
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: 2536862 ("lwt: Add support to redirect dst.input") Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent ee3d7c6 commit 11b3d9c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

net/ipv4/route.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2155,8 +2155,10 @@ static struct rtable *__mkroute_output(const struct fib_result *res,
21552155
}
21562156

21572157
rt_set_nexthop(rth, fl4->daddr, res, fnhe, fi, type, 0);
2158-
if (lwtunnel_output_redirect(rth->dst.lwtstate))
2158+
if (lwtunnel_output_redirect(rth->dst.lwtstate)) {
2159+
rth->dst.lwtstate->orig_output = rth->dst.output;
21592160
rth->dst.output = lwtunnel_output;
2161+
}
21602162

21612163
return rth;
21622164
}

0 commit comments

Comments
 (0)