Signed-off-by: Thomas Graf <[EMAIL PROTECTED]>

Index: net-2.6.14/net/ipv6/ip6_fib.c
===================================================================
--- net-2.6.14.orig/net/ipv6/ip6_fib.c
+++ net-2.6.14/net/ipv6/ip6_fib.c
@@ -617,11 +617,10 @@ static inline struct fib6_node *fib6_des
 static struct fib6_node * fib6_lookup_1(struct fib6_node *root,
                                        struct lookup_args *args)
 {
-       struct fib6_node *fn;
-
-       fn = fib6_descend_tree(root, args);
+       struct fib6_node *fn, *leaf;
 
-       while (!fib6_root_node(fn)) {
+       leaf = fib6_descend_tree(root, args);
+       for (fn = leaf; !fib6_root_node(fn); fn = fn->parent) {
 #ifdef CONFIG_IPV6_SUBTREES
                if (fn->subtree && args[1].addr) {
                        struct fib6_node *st;
@@ -637,8 +636,6 @@ static struct fib6_node * fib6_lookup_1(
                        if (ipv6_prefix_equal(&k->addr, args->addr, k->plen))
                                return fn;
                }
-
-               fn = fn->parent;
        }
 
        return NULL;

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to