lib, zebra: Rename ZEBRA_VRF_ACTIVE

ZEBRA_VRF_ACTIVE is a poor name for when a vrf is
actually active.  Rename VRF_ACTIVE.

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>
This commit is contained in:
Donald Sharp 2016-04-07 11:19:58 -04:00
parent eaa9cafdce
commit 79694123fd
4 changed files with 8 additions and 8 deletions

View File

@ -874,7 +874,7 @@ DEFUN_NOSH (no_vrf,
return CMD_WARNING;
}
if (CHECK_FLAG (vrfp->status, ZEBRA_VRF_ACTIVE))
if (CHECK_FLAG (vrfp->status, VRF_ACTIVE))
{
vty_out (vty, "%% Only inactive VRFs can be deleted%s",
VTY_NEWLINE);

View File

@ -88,7 +88,7 @@ vrf_create (const char *name, size_t namelen)
zlog_err("vrf_create(%s): corruption detected -- vrf with this "
"name exists already with vrf-id %u!", vrfp->name, vrfp->vrf_id);
UNSET_FLAG(vrfp->status, ZEBRA_VRF_ACTIVE);
UNSET_FLAG(vrfp->status, VRF_ACTIVE);
if (vrf_master.vrf_new_hook)
(*vrf_master.vrf_new_hook) (0, name, &vrfp->info);
@ -209,7 +209,7 @@ vrf_delete (struct vrf *vrf)
if (vrf_master.vrf_delete_hook)
(*vrf_master.vrf_delete_hook) (vrf->vrf_id, vrf->name, &vrf->info);
if (CHECK_FLAG (vrf->status, ZEBRA_VRF_ACTIVE))
if (CHECK_FLAG (vrf->status, VRF_ACTIVE))
if_terminate (vrf->vrf_id, &vrf->iflist);
if (vrf->node)
@ -249,7 +249,7 @@ vrf_lookup (vrf_id_t vrf_id)
static int
vrf_is_enabled (struct vrf *vrf)
{
return vrf && CHECK_FLAG (vrf->status, ZEBRA_VRF_ACTIVE);
return vrf && CHECK_FLAG (vrf->status, VRF_ACTIVE);
/*Pending: figure out the real use of this routine.. it used to be..
return vrf && vrf->vrf_id == VRF_DEFAULT;

View File

@ -75,7 +75,7 @@ struct vrf
/* Zebra internal VRF status */
u_char status;
#define ZEBRA_VRF_ACTIVE (1 << 0)
#define VRF_ACTIVE (1 << 0)
struct route_node *node;

View File

@ -721,9 +721,9 @@ vrf_add_update (struct vrf *vrfp)
{
zebra_vrf_add_update (vrf_info_lookup (vrfp->vrf_id));
if (! CHECK_FLAG (vrfp->status, ZEBRA_VRF_ACTIVE))
if (! CHECK_FLAG (vrfp->status, VRF_ACTIVE))
{
SET_FLAG (vrfp->status, ZEBRA_VRF_ACTIVE);
SET_FLAG (vrfp->status, VRF_ACTIVE);
//Pending: Check if the equivalent of if_addr_wakeup (ifp) is needed here.
@ -744,7 +744,7 @@ void
vrf_delete_update (struct vrf *vrfp)
{
/* Mark VRF as inactive */
UNSET_FLAG (vrfp->status, ZEBRA_VRF_ACTIVE);
UNSET_FLAG (vrfp->status, VRF_ACTIVE);
if (IS_ZEBRA_DEBUG_KERNEL)
zlog_debug ("VRF %s id %u is now inactive.",