diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-12-16 16:31:43 +0100 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-12-16 16:31:43 +0100 |
commit | e87a95d97d18eb12d005312f27b082f0821d3923 (patch) | |
tree | 51eb29b6f0b12cad8ceba9870dbe0b53bc577c2f /nest/rt-fib.c | |
parent | 3013fc57bdc97b0031c4f4250b9bdd172f4c0f4e (diff) |
Minor fixes for debug mode
Diffstat (limited to 'nest/rt-fib.c')
-rw-r--r-- | nest/rt-fib.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/nest/rt-fib.c b/nest/rt-fib.c index 60c3da55..24a7facc 100644 --- a/nest/rt-fib.c +++ b/nest/rt-fib.c @@ -568,22 +568,17 @@ found: void fib_check(struct fib *f) { -#if 0 - uint i, ec, lo, nulls; + uint i, ec, nulls; ec = 0; for(i=0; i<f->hash_size; i++) { struct fib_node *n; - lo = 0; for(n=f->hash_table[i]; n; n=n->next) { struct fib_iterator *j, *j0; - uint h0 = ipa_hash(n->prefix); - if (h0 < lo) - bug("fib_check: discord in hash chains"); - lo = h0; - if ((h0 >> f->hash_shift) != i) + uint h0 = fib_hash(f, n->addr); + if (h0 != i) bug("fib_check: mishashed %x->%x (order %d)", h0, i, f->hash_order); j0 = (struct fib_iterator *) n; nulls = 0; @@ -604,7 +599,6 @@ fib_check(struct fib *f) } if (ec != f->entries) bug("fib_check: invalid entry count (%d != %d)", ec, f->entries); -#endif return; } |