From f1a0393033571f6eb78bafd77ea715c0634f1535 Mon Sep 17 00:00:00 2001 From: Chirag Shah Date: Mon, 2 Oct 2017 11:47:02 -0700 Subject: [PATCH] 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 --- ospfd/ospf_interface.c | 1 - ospfd/ospf_vty.c | 2 +- ospfd/ospfd.c | 2 +- ospfd/ospfd.h | 2 -- 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c index b623b173c1..d8d7caa688 100644 --- a/ospfd/ospf_interface.c +++ b/ospfd/ospf_interface.c @@ -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); } diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index a79a1ce9a4..3840bc4170 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -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 diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c index ac88ff292d..507c97d979 100644 --- a/ospfd/ospfd.c +++ b/ospfd/ospfd.c @@ -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); } diff --git a/ospfd/ospfd.h b/ospfd/ospfd.h index fb564ee274..01147c2004 100644 --- a/ospfd/ospfd.h +++ b/ospfd/ospfd.h @@ -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]; -- 2.39.5