diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2016-10-29 14:37:11 -0200 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2016-11-28 16:18:35 -0200 |
| commit | 1a1a70655c869a1b66e363894e5aba19f4aa08f3 (patch) | |
| tree | 8eea443fc57ac5766128d41e27c9411a3c1c7afc /zebra/router-id.c | |
| parent | c7fdd84f36a262d062a10c1439121df361ab78d3 (diff) | |
lib: convert vrf code to use red-black trees as well
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'zebra/router-id.c')
| -rw-r--r-- | zebra/router-id.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/zebra/router-id.c b/zebra/router-id.c index d5d9652c59..155a8e3939 100644 --- a/zebra/router-id.c +++ b/zebra/router-id.c @@ -195,11 +195,11 @@ router_id_del_address (struct connected *ifc) void router_id_write (struct vty *vty) { + struct vrf *vrf; struct zebra_vrf *zvrf; - vrf_iter_t iter; - for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter)) - if ((zvrf = vrf_iter2info (iter)) != NULL) + RB_FOREACH (vrf, vrf_id_head, &vrfs_by_id) + if ((zvrf = vrf->info) != NULL) if (zvrf->rid_user_assigned.u.prefix4.s_addr) { if (zvrf->vrf_id == VRF_DEFAULT) |
