ospfd: OSPFv2 VRF remove iflist from master

Remove instances of ospf master's iflist and use vrf_list
with ospf vrf_id.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
This commit is contained in:
Chirag Shah 2017-10-02 11:47:02 -07:00
parent e1b18df1ea
commit f1a0393033
4 changed files with 2 additions and 5 deletions

View File

@ -1180,7 +1180,6 @@ u_char ospf_default_iftype(struct interface *ifp)
void ospf_if_init()
{
/* Initialize Zebra interface data structure. */
om->iflist = vrf_iflist(VRF_DEFAULT);
hook_register_prio(if_add, 0, ospf_if_new_hook);
hook_register_prio(if_del, 0, ospf_if_delete_hook);
}

View File

@ -9328,7 +9328,7 @@ static int ospf_config_write_one(struct vty *vty, struct ospf *ospf)
if (ospf->passive_interface_default == OSPF_IF_PASSIVE)
vty_out(vty, " passive-interface default\n");
for (ALL_LIST_ELEMENTS_RO(om->iflist, node, ifp))
for (ALL_LIST_ELEMENTS_RO(vrf_iflist(ospf->vrf_id), node, ifp))
if (OSPF_IF_PARAM_CONFIGURED(IF_DEF_PARAMS(ifp),
passive_interface)
&& IF_DEF_PARAMS(ifp)->passive_interface

View File

@ -1260,7 +1260,7 @@ static void ospf_network_run(struct prefix *p, struct ospf_area *area)
ospf_router_id_update(area->ospf);
/* Get target interface. */
for (ALL_LIST_ELEMENTS_RO(om->iflist, node, ifp))
for (ALL_LIST_ELEMENTS_RO(vrf_iflist(area->ospf->vrf_id), node, ifp))
ospf_network_run_interface(area->ospf, ifp, p, area);
}

View File

@ -93,8 +93,6 @@ struct ospf_master {
/* OSPF thread master. */
struct thread_master *master;
/* Zebra interface list. */
struct list *iflist;
/* Redistributed external information. */
struct list *external[ZEBRA_ROUTE_MAX + 1];