Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 912a41a4 authored by Sergey Vlasov's avatar Sergey Vlasov Committed by David S. Miller
Browse files

[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: default avatarSergey Vlasov <vsu@altlinux.ru>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ebbd90a7
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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();