diff options
Diffstat (limited to 'zebra/interface.c')
| -rw-r--r-- | zebra/interface.c | 45 |
1 files changed, 25 insertions, 20 deletions
diff --git a/zebra/interface.c b/zebra/interface.c index bcb833b8d8..a434ba0d38 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -617,11 +617,14 @@ void if_add_update(struct interface *ifp) SET_FLAG(ifp->status, ZEBRA_INTERFACE_ACTIVE); if (if_data->shutdown == IF_ZEBRA_SHUTDOWN_ON) { - if (IS_ZEBRA_DEBUG_KERNEL) + if (IS_ZEBRA_DEBUG_KERNEL) { zlog_debug( - "interface %s vrf %u index %d is shutdown. " + "interface %s vrf %s(%u) index %d is shutdown. " "Won't wake it up.", - ifp->name, ifp->vrf_id, ifp->ifindex); + ifp->name, VRF_LOGNAME(zvrf->vrf), + ifp->vrf_id, ifp->ifindex); + } + return; } @@ -629,13 +632,15 @@ void if_add_update(struct interface *ifp) if (IS_ZEBRA_DEBUG_KERNEL) zlog_debug( - "interface %s vrf %u index %d becomes active.", - ifp->name, ifp->vrf_id, ifp->ifindex); + "interface %s vrf %s(%u) index %d becomes active.", + ifp->name, VRF_LOGNAME(zvrf->vrf), ifp->vrf_id, + ifp->ifindex); } else { if (IS_ZEBRA_DEBUG_KERNEL) - zlog_debug("interface %s vrf %u index %d is added.", - ifp->name, ifp->vrf_id, ifp->ifindex); + zlog_debug("interface %s vrf %s(%u) index %d is added.", + ifp->name, VRF_LOGNAME(zvrf->vrf), + ifp->vrf_id, ifp->ifindex); } } @@ -774,10 +779,12 @@ void if_delete_update(struct interface *ifp) struct zebra_if *zif; if (if_is_up(ifp)) { + struct vrf *vrf = vrf_lookup_by_id(ifp->vrf_id); + flog_err( EC_LIB_INTERFACE, - "interface %s vrf %u index %d is still up while being deleted.", - ifp->name, ifp->vrf_id, ifp->ifindex); + "interface %s vrf %s(%u) index %d is still up while being deleted.", + ifp->name, VRF_LOGNAME(vrf), ifp->vrf_id, ifp->ifindex); return; } @@ -787,9 +794,13 @@ void if_delete_update(struct interface *ifp) /* Mark interface as inactive */ UNSET_FLAG(ifp->status, ZEBRA_INTERFACE_ACTIVE); - if (IS_ZEBRA_DEBUG_KERNEL) - zlog_debug("interface %s vrf %u index %d is now inactive.", - ifp->name, ifp->vrf_id, ifp->ifindex); + if (IS_ZEBRA_DEBUG_KERNEL) { + struct vrf *vrf = vrf_lookup_by_id(ifp->vrf_id); + + zlog_debug("interface %s vrf %s(%u) index %d is now inactive.", + ifp->name, VRF_LOGNAME(vrf), ifp->vrf_id, + ifp->ifindex); + } /* Delete connected routes from the kernel. */ if_delete_connected(ifp); @@ -1231,27 +1242,21 @@ static const char *zebra_ziftype_2str(zebra_iftype_t zif_type) switch (zif_type) { case ZEBRA_IF_OTHER: return "Other"; - break; case ZEBRA_IF_BRIDGE: return "Bridge"; - break; case ZEBRA_IF_VLAN: return "Vlan"; - break; case ZEBRA_IF_VXLAN: return "Vxlan"; - break; case ZEBRA_IF_VRF: return "VRF"; - break; case ZEBRA_IF_VETH: return "VETH"; - break; case ZEBRA_IF_BOND: return "bond"; @@ -1264,7 +1269,6 @@ static const char *zebra_ziftype_2str(zebra_iftype_t zif_type) default: return "Unknown"; - break; } } @@ -1870,7 +1874,8 @@ DEFUN (show_interface_desc_vrf_all, RB_FOREACH (vrf, vrf_name_head, &vrfs_by_name) if (!RB_EMPTY(if_name_head, &vrf->ifaces_by_name)) { - vty_out(vty, "\n\tVRF %u\n\n", vrf->vrf_id); + vty_out(vty, "\n\tVRF %s(%u)\n\n", VRF_LOGNAME(vrf), + vrf->vrf_id); if_show_description(vty, vrf->vrf_id); } |
