| From davem@davemloft.net Fri Apr 27 02:18:34 2007 |
| From: Sergey Vlasov <vsu@altlinux.ru> |
| Date: Fri, 27 Apr 2007 02:18:35 -0700 (PDT) |
| Subject: IPV4: Fix OOPS'er added to netlink fib. |
| To: greg@kroah.com |
| Message-ID: <20070427.021835.115909046.davem@davemloft.net> |
| |
| From: Sergey Vlasov <vsu@altlinux.ru> |
| |
| [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 | 4 ++++ |
| 1 file changed, 4 insertions(+) |
| |
| --- a/net/ipv4/fib_frontend.c |
| +++ b/net/ipv4/fib_frontend.c |
| @@ -777,6 +777,10 @@ static void nl_fib_lookup(struct fib_res |
| .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(); |