提交 912a41a4 编写于 作者: S Sergey Vlasov 提交者: David S. Miller

[IPV4] nl_fib_lookup: Initialise res.r before fib_res_put(&res)

When CONFIG_IP_MULTIPLE_TABLES is enabled, the code in nl_fib_lookup()
needs to initialize the res.r field before fib_res_put(&res) - unlike
fib_lookup(), a direct call to ->tb_lookup does not set this field.
Signed-off-by: NSergey Vlasov <vsu@altlinux.ru>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 ebbd90a7
......@@ -777,6 +777,10 @@ static void nl_fib_lookup(struct fib_result_nl *frn, struct fib_table *tb )
.tos = frn->fl_tos,
.scope = frn->fl_scope } } };
#ifdef CONFIG_IP_MULTIPLE_TABLES
res.r = NULL;
#endif
frn->err = -ENOENT;
if (tb) {
local_bh_disable();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册