diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-04-08 15:16:14 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-04-08 19:15:59 +0200 |
commit | b2d7c082a2ec76e34c5ec528ac649e185d035616 (patch) | |
tree | 256011582e089e5ff80d0ec87ea8ea5d0d5a35f3 /ospfd | |
parent | lib, zebra: Rename ZEBRA_VRF_ACTIVE (diff) | |
download | frr-b2d7c082a2ec76e34c5ec528ac649e185d035616.tar.xz frr-b2d7c082a2ec76e34c5ec528ac649e185d035616.zip |
quagga: Remove iflist global variable
The file if.c has a iflist that had the list of interfaces
in the default vrf. Remove this variable and replace
with a vrf_iflist lookup on the default vrf where it
was used.
Additionally, modify ptm code to iterate over all vrf's
when enabling ptm.
Ticket: CM-10338
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Radhika Mahankali <radhika@cumulusnetworks.com>
Diffstat (limited to 'ospfd')
-rw-r--r-- | ospfd/ospf_interface.c | 2 | ||||
-rw-r--r-- | ospfd/ospf_te.c | 3 | ||||
-rw-r--r-- | ospfd/ospf_vty.c | 8 | ||||
-rw-r--r-- | ospfd/ospfd.c | 2 |
4 files changed, 8 insertions, 7 deletions
diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c index c0b4e7abe..628091963 100644 --- a/ospfd/ospf_interface.c +++ b/ospfd/ospf_interface.c @@ -1269,7 +1269,7 @@ void ospf_if_init () { /* Initialize Zebra interface data structure. */ - om->iflist = iflist; + om->iflist = vrf_iflist (VRF_DEFAULT); if_add_hook (IF_NEW_HOOK, ospf_if_new_hook); if_add_hook (IF_DELETE_HOOK, ospf_if_delete_hook); } diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c index 6f19a2832..565a61aaa 100644 --- a/ospfd/ospf_te.c +++ b/ospfd/ospf_te.c @@ -33,6 +33,7 @@ #include "linklist.h" #include "prefix.h" +#include "vrf.h" #include "if.h" #include "table.h" #include "memory.h" @@ -1890,7 +1891,7 @@ DEFUN (show_mpls_te_link, /* Show All Interfaces. */ if (argc == 0) { - for (ALL_LIST_ELEMENTS (iflist, node, nnode, ifp)) + for (ALL_LIST_ELEMENTS (vrf_iflist (VRF_DEFAULT), node, nnode, ifp)) show_mpls_te_link_sub (vty, ifp); } /* Interface name is specified. */ diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index 8cdf6e9d6..ab0ed14f1 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -3927,7 +3927,7 @@ show_ip_ospf_interface_common (struct vty *vty, struct ospf *ospf, int argc, if (argc == (iface_argv + 1)) { /* Show All Interfaces.*/ - for (ALL_LIST_ELEMENTS_RO (iflist, node, ifp)) + for (ALL_LIST_ELEMENTS_RO (vrf_iflist (VRF_DEFAULT), node, ifp)) { if (ospf_oi_count(ifp)) { @@ -3938,7 +3938,7 @@ show_ip_ospf_interface_common (struct vty *vty, struct ospf *ospf, int argc, else if (argv[iface_argv] && strcmp(argv[iface_argv], "json") == 0) { /* Show All Interfaces. */ - for (ALL_LIST_ELEMENTS_RO (iflist, node, ifp)) + for (ALL_LIST_ELEMENTS_RO (vrf_iflist (VRF_DEFAULT), node, ifp)) { if (ospf_oi_count(ifp)) { @@ -9280,7 +9280,7 @@ config_write_interface (struct vty *vty) struct ospf_if_params *params; struct ospf *ospf = ospf_lookup(); - for (ALL_LIST_ELEMENTS_RO (iflist, n1, ifp)) + for (ALL_LIST_ELEMENTS_RO (vrf_iflist (VRF_DEFAULT), n1, ifp)) { if (memcmp (ifp->name, "VLINK", 5) == 0) continue; @@ -10284,7 +10284,7 @@ DEFUN (clear_ip_ospf_interface, if (argc == 0) /* Clear all the ospfv2 interfaces. */ { - for (ALL_LIST_ELEMENTS_RO (iflist, node, ifp)) + for (ALL_LIST_ELEMENTS_RO (vrf_iflist (VRF_DEFAULT), node, ifp)) ospf_interface_clear(ifp); } else /* Interface name is specified. */ diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c index 8fbecee05..d7d22a272 100644 --- a/ospfd/ospfd.c +++ b/ospfd/ospfd.c @@ -539,7 +539,7 @@ ospf_finish_final (struct ospf *ospf) list_delete (ospf->vlinks); /* Remove any ospf interface config params */ - for (ALL_LIST_ELEMENTS_RO (iflist, node, ifp)) + for (ALL_LIST_ELEMENTS_RO (vrf_iflist (VRF_DEFAULT), node, ifp)) { struct ospf_if_params *params; |