summaryrefslogtreecommitdiff
path: root/nest/rt-fib.c
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2015-10-05 12:14:50 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2015-10-05 13:18:10 +0200
commit8465dccb06afffed171dc1e224e4eb5f67cc3326 (patch)
tree9e5209b312ba8b7eabd0f5a22aea4a0888cd8c9f /nest/rt-fib.c
parentc7b99a932cab1873042e356143ab71755920157a (diff)
Major RIP redesign
The new RIP implementation fixes plenty of old bugs and also adds support for many new features: ECMP support, link state support, BFD support, configurable split horizon and more. Most options are now per-interface.
Diffstat (limited to 'nest/rt-fib.c')
-rw-r--r--nest/rt-fib.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/nest/rt-fib.c b/nest/rt-fib.c
index aa5e2357..a73de1fd 100644
--- a/nest/rt-fib.c
+++ b/nest/rt-fib.c
@@ -430,6 +430,25 @@ fit_put(struct fib_iterator *i, struct fib_node *n)
i->prev = (struct fib_iterator *) n;
}
+void
+fit_put_next(struct fib *f, struct fib_iterator *i, struct fib_node *n, uint hpos)
+{
+ if (n = n->next)
+ goto found;
+
+ while (++hpos < f->hash_size)
+ if (n = f->hash_table[hpos])
+ goto found;
+
+ /* We are at the end */
+ i->prev = i->next = NULL;
+ i->node = NULL;
+ return;
+
+found:
+ fit_put(i, n);
+}
+
#ifdef DEBUGGING
/**