]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/ipv4/fib_trie.c
fib_trie: Correctly handle case of key == 0 in leaf_walk_rcu
[karo-tx-linux.git] / net / ipv4 / fib_trie.c
index fcfa9825a816fa420c76135a9d7ef9c0dd8cc203..44cab1d41463ce732da3b033ec8e29a373ff4306 100644 (file)
@@ -1530,7 +1530,7 @@ static struct key_vector *leaf_walk_rcu(struct key_vector **tn, t_key key)
        do {
                /* record parent and next child index */
                pn = n;
-               cindex = get_index(key, pn);
+               cindex = key ? get_index(key, pn) : 0;
 
                if (cindex >> pn->bits)
                        break;