diff options
Diffstat (limited to 'lib/vrf.c')
| -rw-r--r-- | lib/vrf.c | 20 |
1 files changed, 13 insertions, 7 deletions
@@ -159,10 +159,6 @@ struct vrf *vrf_get(vrf_id_t vrf_id, const char *name) struct vrf *vrf = NULL; int new = 0; - if (debug_vrf) - zlog_debug("VRF_GET: %s(%u)", name == NULL ? "(NULL)" : name, - vrf_id); - /* Nothing to see, move along here */ if (!name && vrf_id == VRF_UNKNOWN) return NULL; @@ -225,7 +221,8 @@ struct vrf *vrf_get(vrf_id_t vrf_id, const char *name) void vrf_delete(struct vrf *vrf) { if (debug_vrf) - zlog_debug("VRF %u is to be deleted.", vrf->vrf_id); + zlog_debug("VRF %s(%u) is to be deleted.", vrf->name, + vrf->vrf_id); if (vrf_is_enabled(vrf)) vrf_disable(vrf); @@ -282,7 +279,7 @@ int vrf_enable(struct vrf *vrf) return 1; if (debug_vrf) - zlog_debug("VRF %u is enabled.", vrf->vrf_id); + zlog_debug("VRF %s(%u) is enabled.", vrf->name, vrf->vrf_id); SET_FLAG(vrf->status, VRF_ACTIVE); @@ -312,11 +309,20 @@ void vrf_disable(struct vrf *vrf) UNSET_FLAG(vrf->status, VRF_ACTIVE); if (debug_vrf) - zlog_debug("VRF %u is to be disabled.", vrf->vrf_id); + zlog_debug("VRF %s(%u) is to be disabled.", vrf->name, + vrf->vrf_id); /* Till now, nothing to be done for the default VRF. */ // Pending: see why this statement. + + /* + * When the vrf is disabled let's + * handle all nexthop-groups associated + * with this vrf + */ + nexthop_group_disable_vrf(vrf); + if (vrf_master.vrf_disable_hook) (*vrf_master.vrf_disable_hook)(vrf); } |
