summaryrefslogtreecommitdiff
path: root/zebra/zebra_vrf.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2016-10-29 14:37:11 -0200
committerRenato Westphal <renato@opensourcerouting.org>2016-11-28 16:18:35 -0200
commit1a1a70655c869a1b66e363894e5aba19f4aa08f3 (patch)
tree8eea443fc57ac5766128d41e27c9411a3c1c7afc /zebra/zebra_vrf.c
parentc7fdd84f36a262d062a10c1439121df361ab78d3 (diff)
lib: convert vrf code to use red-black trees as well
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'zebra/zebra_vrf.c')
-rw-r--r--zebra/zebra_vrf.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/zebra/zebra_vrf.c b/zebra/zebra_vrf.c
index 915849c057..4c1bbbb1a0 100644
--- a/zebra/zebra_vrf.c
+++ b/zebra/zebra_vrf.c
@@ -68,11 +68,10 @@ void
zebra_vrf_update_all (struct zserv *client)
{
struct vrf *vrf;
- vrf_iter_t iter;
- for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter))
+ RB_FOREACH (vrf, vrf_id_head, &vrfs_by_id)
{
- if ((vrf = vrf_iter2vrf (iter)) && vrf->vrf_id)
+ if (vrf->vrf_id)
zsend_vrf_add (client, vrf_info_lookup (vrf->vrf_id));
}
}