Skip to content

Commit

Permalink
[IPV4] nl_fib_lookup: Initialise res.r before fib_res_put(&res)
Browse files Browse the repository at this point in the history
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: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Sergey Vlasov authored and David S. Miller committed Apr 27, 2007
1 parent ebbd90a commit 912a41a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions net/ipv4/fib_frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 912a41a

Please sign in to comment.