mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 20:13:53 +00:00
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:
parent
eaa9cafdce
commit
79694123fd
2
lib/if.c
2
lib/if.c
@ -874,7 +874,7 @@ DEFUN_NOSH (no_vrf,
|
|||||||
return CMD_WARNING;
|
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_out (vty, "%% Only inactive VRFs can be deleted%s",
|
||||||
VTY_NEWLINE);
|
VTY_NEWLINE);
|
||||||
|
@ -88,7 +88,7 @@ vrf_create (const char *name, size_t namelen)
|
|||||||
zlog_err("vrf_create(%s): corruption detected -- vrf with this "
|
zlog_err("vrf_create(%s): corruption detected -- vrf with this "
|
||||||
"name exists already with vrf-id %u!", vrfp->name, vrfp->vrf_id);
|
"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)
|
if (vrf_master.vrf_new_hook)
|
||||||
(*vrf_master.vrf_new_hook) (0, name, &vrfp->info);
|
(*vrf_master.vrf_new_hook) (0, name, &vrfp->info);
|
||||||
@ -209,7 +209,7 @@ vrf_delete (struct vrf *vrf)
|
|||||||
if (vrf_master.vrf_delete_hook)
|
if (vrf_master.vrf_delete_hook)
|
||||||
(*vrf_master.vrf_delete_hook) (vrf->vrf_id, vrf->name, &vrf->info);
|
(*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_terminate (vrf->vrf_id, &vrf->iflist);
|
||||||
|
|
||||||
if (vrf->node)
|
if (vrf->node)
|
||||||
@ -249,7 +249,7 @@ vrf_lookup (vrf_id_t vrf_id)
|
|||||||
static int
|
static int
|
||||||
vrf_is_enabled (struct vrf *vrf)
|
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..
|
/*Pending: figure out the real use of this routine.. it used to be..
|
||||||
return vrf && vrf->vrf_id == VRF_DEFAULT;
|
return vrf && vrf->vrf_id == VRF_DEFAULT;
|
||||||
|
@ -75,7 +75,7 @@ struct vrf
|
|||||||
|
|
||||||
/* Zebra internal VRF status */
|
/* Zebra internal VRF status */
|
||||||
u_char status;
|
u_char status;
|
||||||
#define ZEBRA_VRF_ACTIVE (1 << 0)
|
#define VRF_ACTIVE (1 << 0)
|
||||||
|
|
||||||
struct route_node *node;
|
struct route_node *node;
|
||||||
|
|
||||||
|
@ -721,9 +721,9 @@ vrf_add_update (struct vrf *vrfp)
|
|||||||
{
|
{
|
||||||
zebra_vrf_add_update (vrf_info_lookup (vrfp->vrf_id));
|
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.
|
//Pending: Check if the equivalent of if_addr_wakeup (ifp) is needed here.
|
||||||
|
|
||||||
@ -744,7 +744,7 @@ void
|
|||||||
vrf_delete_update (struct vrf *vrfp)
|
vrf_delete_update (struct vrf *vrfp)
|
||||||
{
|
{
|
||||||
/* Mark VRF as inactive */
|
/* Mark VRF as inactive */
|
||||||
UNSET_FLAG (vrfp->status, ZEBRA_VRF_ACTIVE);
|
UNSET_FLAG (vrfp->status, VRF_ACTIVE);
|
||||||
|
|
||||||
if (IS_ZEBRA_DEBUG_KERNEL)
|
if (IS_ZEBRA_DEBUG_KERNEL)
|
||||||
zlog_debug ("VRF %s id %u is now inactive.",
|
zlog_debug ("VRF %s id %u is now inactive.",
|
||||||
|
Loading…
Reference in New Issue
Block a user