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/router-id.c | |
| parent | 0577b824e137f143c899a567b1bbeb109841c796 (diff) | |
| parent | 8793176b5a180bff8e637ce7cba6005f880e8915 (diff) | |
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/router-id.c')
| -rw-r--r-- | zebra/router-id.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/zebra/router-id.c b/zebra/router-id.c index 23b8cc743c..b1e786d0c8 100644 --- a/zebra/router-id.c +++ b/zebra/router-id.c @@ -138,7 +138,7 @@ router_id_add_address (struct connected *ifc) if (router_id_bad_address (ifc)) return; - router_id_get (&before, zvrf->vrf_id); + router_id_get (&before, zvrf_id (zvrf)); if (!strncmp (ifc->ifp->name, "lo", 2) || !strncmp (ifc->ifp->name, "dummy", 5)) @@ -149,13 +149,13 @@ router_id_add_address (struct connected *ifc) if (!router_id_find_node (l, ifc)) listnode_add_sort (l, ifc); - router_id_get (&after, zvrf->vrf_id); + router_id_get (&after, zvrf_id (zvrf)); if (prefix_same (&before, &after)) return; for (ALL_LIST_ELEMENTS_RO (zebrad.client_list, node, client)) - zsend_router_id_update (client, &after, zvrf->vrf_id); + zsend_router_id_update (client, &after, zvrf_id (zvrf)); } void @@ -172,7 +172,7 @@ router_id_del_address (struct connected *ifc) if (router_id_bad_address (ifc)) return; - router_id_get (&before, zvrf->vrf_id); + router_id_get (&before, zvrf_id (zvrf)); if (!strncmp (ifc->ifp->name, "lo", 2) || !strncmp (ifc->ifp->name, "dummy", 5)) @@ -183,33 +183,33 @@ router_id_del_address (struct connected *ifc) if ((c = router_id_find_node (l, ifc))) listnode_delete (l, c); - router_id_get (&after, zvrf->vrf_id); + router_id_get (&after, zvrf_id (zvrf)); if (prefix_same (&before, &after)) return; for (ALL_LIST_ELEMENTS_RO (zebrad.client_list, node, client)) - zsend_router_id_update (client, &after, zvrf->vrf_id); + zsend_router_id_update (client, &after, zvrf_id (zvrf)); } 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_name_head, &vrfs_by_name) + if ((zvrf = vrf->info) != NULL) if (zvrf->rid_user_assigned.u.prefix4.s_addr) { - if (zvrf->vrf_id == VRF_DEFAULT) + if (zvrf_id (zvrf) == VRF_DEFAULT) vty_out (vty, "router-id %s%s", inet_ntoa (zvrf->rid_user_assigned.u.prefix4), VTY_NEWLINE); else vty_out (vty, "router-id %s vrf %s%s", inet_ntoa (zvrf->rid_user_assigned.u.prefix4), - zvrf->name, + zvrf_name (zvrf), VTY_NEWLINE); } } |
