static void
vrf_disable (struct vrf *vrf)
{
+ UNSET_FLAG (vrf->status, VRF_ACTIVE);
if (vrf_is_enabled (vrf))
{
if (debug_vrf)
if (vrf_master.vrf_disable_hook)
(*vrf_master.vrf_disable_hook) (vrf->vrf_id, vrf->name, &vrf->info);
}
+
}
}
}
-/* Handle an interface delete event */
-void
-vrf_delete_update (struct vrf *vrfp)
-{
- /* Mark VRF as inactive */
- UNSET_FLAG (vrfp->status, VRF_ACTIVE);
-
- if (IS_ZEBRA_DEBUG_KERNEL)
- zlog_debug ("VRF %s id %u is now inactive.",
- vrfp->name, vrfp->vrf_id);
-
- zebra_vrf_delete_update (vrf_info_lookup (vrfp->vrf_id));
-
- /* Pending: Update ifindex after distributing the delete message. This is in
- case any client needs to have the old value of ifindex available
- while processing the deletion. Each client daemon is responsible
- for setting vrf-id to IFINDEX_INTERNAL after processing the
- interface deletion message. */
- vrfp->vrf_id = VRF_UNKNOWN;
-}
-
-
static void
ipv6_ll_address_to_mac (struct in6_addr *address, u_char *mac)
{
extern int ipv6_address_configured (struct interface *ifp);
extern void if_handle_vrf_change (struct interface *ifp, vrf_id_t vrf_id);
-extern void vrf_delete_update (struct vrf *vrfp);
extern void vrf_add_update (struct vrf *vrfp);
#ifdef HAVE_PROC_NET_DEV
static int
zebra_vrf_disable (vrf_id_t vrf_id, const char *name, void **info)
{
+ struct zebra_vrf *zvrf = (struct zebra_vrf *)(*info);
+
+ if (IS_ZEBRA_DEBUG_KERNEL)
+ zlog_debug ("VRF %s id %u is now disabled.",
+ zvrf->name, zvrf->vrf_id);
+
+ zebra_vrf_delete_update (zvrf);
+
return 0;
}
vrf = vrf_lookup ((vrf_id_t)ifi->ifi_index);
if (!vrf)
- zlog_warn ("%s: vrf not found", __func__);
+ {
+ zlog_warn ("%s: vrf not found", __func__);
+ return;
+ }
- vrf_delete_update (vrf);
vrf_delete (vrf);
}
}