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/zebra_routemap.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/zebra_routemap.c')
| -rw-r--r-- | zebra/zebra_routemap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/zebra/zebra_routemap.c b/zebra/zebra_routemap.c index 25091a3eab..3075a61c4a 100644 --- a/zebra/zebra_routemap.c +++ b/zebra/zebra_routemap.c @@ -633,7 +633,7 @@ DEFUN (set_src, struct interface *pif = NULL; int family; struct prefix p; - vrf_iter_t iter; + struct vrf *vrf; if (inet_pton(AF_INET, argv[0], &src.ipv4) != 1) { @@ -660,14 +660,14 @@ DEFUN (set_src, return CMD_WARNING; } - for (iter = vrf_first (); iter != VRF_ITER_INVALID; iter = vrf_next (iter)) + RB_FOREACH (vrf, vrf_id_head, &vrfs_by_id) { if (family == AF_INET) pif = if_lookup_exact_address_vrf ((void *)&src.ipv4, AF_INET, - vrf_iter2id (iter)); + vrf->vrf_id); else if (family == AF_INET6) pif = if_lookup_exact_address_vrf ((void *)&src.ipv6, AF_INET6, - vrf_iter2id (iter)); + vrf->vrf_id); if (pif != NULL) break; |
