summaryrefslogtreecommitdiff
path: root/proto/rip/packets.c
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2015-12-21 20:16:05 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2015-12-21 20:28:44 +0100
commit600998fcb1a1d155215ab32644982e9b78767e3e (patch)
tree987193a992951f8a543d3473441202b6b26f0f08 /proto/rip/packets.c
parent67aa88336a91e635753ba42df45d7de5e191ed35 (diff)
Modify FIB_WALK() and FIB_ITERATE() to work with new FIB code
Returned user data pointers have offset relative to fib_node.
Diffstat (limited to 'proto/rip/packets.c')
-rw-r--r--proto/rip/packets.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/proto/rip/packets.c b/proto/rip/packets.c
index 2e83a463..1017eb92 100644
--- a/proto/rip/packets.c
+++ b/proto/rip/packets.c
@@ -417,10 +417,8 @@ rip_send_response(struct rip_proto *p, struct rip_iface *ifa)
pkt->unused = 0;
pos += rip_pkt_hdrlen(ifa);
- FIB_ITERATE_START(&p->rtable, &ifa->tx_fit, z)
+ FIB_ITERATE_START(&p->rtable, &ifa->tx_fit, struct rip_entry, en)
{
- struct rip_entry *en = (struct rip_entry *) z;
-
/* Dummy entries */
if (!en->valid)
goto next_entry;
@@ -437,7 +435,7 @@ rip_send_response(struct rip_proto *p, struct rip_iface *ifa)
/* Not enough space for current entry */
if (pos > max)
{
- FIB_ITERATE_PUT(&ifa->tx_fit, z);
+ FIB_ITERATE_PUT(&ifa->tx_fit);
goto break_loop;
}
@@ -490,7 +488,7 @@ rip_send_response(struct rip_proto *p, struct rip_iface *ifa)
next_entry: ;
}
- FIB_ITERATE_END(z);
+ FIB_ITERATE_END;
ifa->tx_active = 0;
/* Do not send empty packet */