diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-04-08 09:16:14 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-04-08 13:15:59 -0400 |
| commit | b2d7c082a2ec76e34c5ec528ac649e185d035616 (patch) | |
| tree | 256011582e089e5ff80d0ec87ea8ea5d0d5a35f3 /lib/vrf.c | |
| parent | 79694123fde6ce0ce9a359f8a31817ffa3c7978f (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/vrf.c')
| -rw-r--r-- | lib/vrf.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -70,7 +70,7 @@ vrf_list_lookup_by_name (const char *name) return NULL; } -/* Create new interface structure. */ +/* Create new vrf structure. */ struct vrf * vrf_create (const char *name, size_t namelen) { @@ -184,7 +184,7 @@ vrf_get (vrf_id_t vrf_id, const char *name) vrf->node = rn; /* Initialize interfaces. */ - if_init (vrf_id, &vrf->iflist); + if_init (&vrf->iflist); } if (vrf_master.vrf_new_hook && name) { @@ -210,7 +210,7 @@ vrf_delete (struct vrf *vrf) (*vrf_master.vrf_delete_hook) (vrf->vrf_id, vrf->name, &vrf->info); if (CHECK_FLAG (vrf->status, VRF_ACTIVE)) - if_terminate (vrf->vrf_id, &vrf->iflist); + if_terminate (&vrf->iflist); if (vrf->node) { @@ -491,7 +491,7 @@ vrf_iflist_create (vrf_id_t vrf_id) { struct vrf * vrf = vrf_lookup (vrf_id); if (vrf && !vrf->iflist) - if_init (vrf_id, &vrf->iflist); + if_init (&vrf->iflist); } /* Free the interface list of the specified VRF. */ @@ -500,7 +500,7 @@ vrf_iflist_terminate (vrf_id_t vrf_id) { struct vrf * vrf = vrf_lookup (vrf_id); if (vrf && vrf->iflist) - if_terminate (vrf->vrf_id, &vrf->iflist); + if_terminate (&vrf->iflist); } /* |
