diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2016-12-05 19:43:38 +0100 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2016-12-05 19:48:38 +0100 |
commit | 53dc2b05c76f4f5cd6a72373fb241afdcedb2ee1 (patch) | |
tree | d43e2f4f851f368dcc943a9b30e73ff603ea5bc1 /zebra/rt_netlink.c | |
parent | Merge branch 'stable/2.0' (diff) | |
parent | build: number sections in COMMUNITY.md HTML (diff) | |
download | frr-53dc2b05c76f4f5cd6a72373fb241afdcedb2ee1.tar.xz frr-53dc2b05c76f4f5cd6a72373fb241afdcedb2ee1.zip |
Merge branch 'stable/2.0'
Conflicts:
bgpd/bgp_route.c
lib/if.c
ripd/rip_interface.c
zebra/interface.c
zebra/zebra_vty.c
Diffstat (limited to 'zebra/rt_netlink.c')
-rw-r--r-- | zebra/rt_netlink.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index 90d71e635..f168ef395 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -99,16 +99,16 @@ Pending: create an efficient table_id (in a tree/hash) based lookup) static vrf_id_t vrf_lookup_by_table (u_int32_t table_id) { + struct vrf *vrf; struct zebra_vrf *zvrf; - 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 ((zvrf = vrf_iter2info (iter)) == NULL || + if ((zvrf = vrf->info) == NULL || (zvrf->table_id != table_id)) continue; - return zvrf->vrf_id; + return zvrf_id (zvrf); } return VRF_DEFAULT; @@ -1069,7 +1069,7 @@ _netlink_route_debug( zlog_debug ("netlink_route_multipath() (%s): %s %s vrf %u type %s", routedesc, nl_msg_type_to_str (cmd), - prefix2str (p, buf, sizeof(buf)), zvrf->vrf_id, + prefix2str (p, buf, sizeof(buf)), zvrf_id (zvrf), (nexthop) ? nexthop_type_to_str (nexthop->type) : "UNK"); } } |