From 79694123fde6ce0ce9a359f8a31817ffa3c7978f Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 7 Apr 2016 11:19:58 -0400 Subject: [PATCH] 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 Reviewed-by: Don Slice Reviewed-by: Radhika Mahankali --- lib/if.c | 2 +- lib/vrf.c | 6 +++--- lib/vrf.h | 2 +- zebra/interface.c | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/if.c b/lib/if.c index 418477efea..33481c32f8 100644 --- a/lib/if.c +++ b/lib/if.c @@ -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); diff --git a/lib/vrf.c b/lib/vrf.c index bb986bca45..329e9a4d06 100644 --- a/lib/vrf.c +++ b/lib/vrf.c @@ -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; diff --git a/lib/vrf.h b/lib/vrf.h index 4e55ec162c..3172b4f4c5 100644 --- a/lib/vrf.h +++ b/lib/vrf.h @@ -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; diff --git a/zebra/interface.c b/zebra/interface.c index 38fe6988eb..661552d799 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -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.", -- 2.39.5