]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - net/ipv4/fib_rules.c
Merge tag 'v2.6.37' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[mv-sheeva.git] / net / ipv4 / fib_rules.c
index 76daeb5ff5642e656622f0da906f73a32d603643..7981a24f5c7b3b51e5c23c825f98e12b02dfcd87 100644 (file)
@@ -6,7 +6,7 @@
  *             IPv4 Forwarding Information Base: policy rules.
  *
  * Authors:    Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
- *             Thomas Graf <tgraf@suug.ch>
+ *             Thomas Graf <tgraf@suug.ch>
  *
  *             This program is free software; you can redistribute it and/or
  *             modify it under the terms of the GNU General Public License
@@ -14,7 +14,7 @@
  *             2 of the License, or (at your option) any later version.
  *
  * Fixes:
- *             Rani Assaf      :       local_rule cannot be deleted
+ *             Rani Assaf      :       local_rule cannot be deleted
  *             Marc Boucher    :       routing by fwmark
  */
 
@@ -32,8 +32,7 @@
 #include <net/ip_fib.h>
 #include <net/fib_rules.h>
 
-struct fib4_rule
-{
+struct fib4_rule {
        struct fib_rule         common;
        u8                      dst_len;
        u8                      src_len;
@@ -58,6 +57,7 @@ int fib_lookup(struct net *net, struct flowi *flp, struct fib_result *res)
 {
        struct fib_lookup_arg arg = {
                .result = res,
+               .flags = FIB_LOOKUP_NOREF,
        };
        int err;
 
@@ -91,10 +91,11 @@ static int fib4_rule_action(struct fib_rule *rule, struct flowi *flp,
                goto errout;
        }
 
-       if ((tbl = fib_get_table(rule->fr_net, rule->table)) == NULL)
+       tbl = fib_get_table(rule->fr_net, rule->table);
+       if (!tbl)
                goto errout;
 
-       err = fib_table_lookup(tbl, flp, (struct fib_result *) arg->result);
+       err = fib_table_lookup(tbl, flp, (struct fib_result *) arg->result, arg->flags);
        if (err > 0)
                err = -EAGAIN;
 errout: