]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
IPV4: Fix OOPS'er added to netlink fib.
authorSergey Vlasov <vsu@altlinux.ru>
Fri, 27 Apr 2007 09:18:35 +0000 (02:18 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 27 Apr 2007 21:26:22 +0000 (14:26 -0700)
[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: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/ipv4/fib_frontend.c

index fa2cb8c2989182cf1d7a6721612ea2936297cc1a..30aae76c6f71f1638ebedcd0b822d0a8fce04726 100644 (file)
@@ -773,6 +773,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();