summaryrefslogtreecommitdiff
path: root/lib/if.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2016-04-08 09:16:14 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-04-08 13:15:59 -0400
commitb2d7c082a2ec76e34c5ec528ac649e185d035616 (patch)
tree256011582e089e5ff80d0ec87ea8ea5d0d5a35f3 /lib/if.c
parent79694123fde6ce0ce9a359f8a31817ffa3c7978f (diff)
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 'lib/if.c')
-rw-r--r--lib/if.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/if.c b/lib/if.c
index 33481c32f8..1d0518956a 100644
--- a/lib/if.c
+++ b/lib/if.c
@@ -38,7 +38,6 @@
#include "log.h"
/* List of interfaces in only the default VRF */
-struct list *iflist;
int ptm_enable = 0;
/* One for each program. This structure is needed to store hooks. */
@@ -1261,7 +1260,7 @@ ifaddr_ipv4_lookup (struct in_addr *addr, unsigned int ifindex)
/* Initialize interface list. */
void
-if_init (vrf_id_t vrf_id, struct list **intf_list)
+if_init (struct list **intf_list)
{
*intf_list = list_new ();
#if 0
@@ -1269,13 +1268,10 @@ if_init (vrf_id_t vrf_id, struct list **intf_list)
#endif /* ifaddr_ipv4_table */
(*intf_list)->cmp = (int (*)(void *, void *))if_cmp_func;
-
- if (vrf_id == VRF_DEFAULT)
- iflist = *intf_list;
}
void
-if_terminate (vrf_id_t vrf_id, struct list **intf_list)
+if_terminate (struct list **intf_list)
{
for (;;)
{
@@ -1290,7 +1286,4 @@ if_terminate (vrf_id_t vrf_id, struct list **intf_list)
list_delete (*intf_list);
*intf_list = NULL;
-
- if (vrf_id == VRF_DEFAULT)
- iflist = NULL;
}