提交 11b3d9c5 编写于 作者: T Thomas Graf 提交者: David S. Miller

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: 25368623 ("lwt: Add support to redirect dst.input")
Signed-off-by: NThomas Graf <tgraf@suug.ch>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 ee3d7c6e
...@@ -2155,8 +2155,10 @@ static struct rtable *__mkroute_output(const struct fib_result *res, ...@@ -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); 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; rth->dst.output = lwtunnel_output;
}
return rth; return rth;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册