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;
}
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);
}
}
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;
}
/* 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);
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);
}
if (IS_ZEBRA_DEBUG_EVENT)
zlog_debug(
- "%s: client proto %s afi=%d, wants %s, vrf %u, instance=%d",
+ "%s: client proto %s afi=%d, wants %s, vrf %s(%u), instance=%d",
__func__, zebra_route_string(client->proto), afi,
- zebra_route_string(type), zvrf_id(zvrf), instance);
+ zebra_route_string(type), VRF_LOGNAME(zvrf->vrf),
+ zvrf_id(zvrf), instance);
if (afi == 0 || afi >= AFI_MAX) {
flog_warn(EC_ZEBRA_REDISTRIBUTE_UNKNOWN_AF,
if (!vrf_bitmap_check(client->redist[afi][type],
zvrf_id(zvrf))) {
if (IS_ZEBRA_DEBUG_EVENT)
- zlog_debug("%s: setting vrf %u redist bitmap",
- __func__, zvrf_id(zvrf));
+ zlog_debug(
+ "%s: setting vrf %s(%u) redist bitmap",
+ __func__, VRF_LOGNAME(zvrf->vrf),
+ zvrf_id(zvrf));
vrf_bitmap_set(client->redist[afi][type],
zvrf_id(zvrf));
zebra_redistribute(client, type, 0, zvrf_id(zvrf), afi);
struct stream *s;
uint8_t proto;
uint16_t instance;
+ struct vrf *vrf = vrf_lookup_by_id(vrf_id);
s = msg;
zsend_table_manager_connect_response(client, vrf_id, 1);
return;
}
- zlog_notice("client %d with vrf %u instance %u connected as %s",
- client->sock, vrf_id, instance, zebra_route_string(proto));
+ zlog_notice("client %d with vrf %s(%u) instance %u connected as %s",
+ client->sock, VRF_LOGNAME(vrf), vrf_id, instance,
+ zebra_route_string(proto));
client->proto = proto;
client->instance = instance;
dp->prefixlen, ifp->name,
bfd_get_status_str(status));
} else {
+ struct vrf *vrf = vrf_lookup_by_id(vrf_id);
+
zlog_debug(
"MESSAGE: ZEBRA_INTERFACE_BFD_DEST_UPDATE %s/%d "
- "with src %s/%d and vrf %u %s event",
+ "with src %s/%d and vrf %s(%u) %s event",
inet_ntop(dp->family, &dp->u.prefix, buf[0],
INET6_ADDRSTRLEN),
dp->prefixlen,
inet_ntop(sp->family, &sp->u.prefix, buf[1],
INET6_ADDRSTRLEN),
- sp->prefixlen, vrf_id,
+ sp->prefixlen, VRF_LOGNAME(vrf), vrf_id,
bfd_get_status_str(status));
}
}
char srcaddr[PREFIX_STRLEN];
char nhname[PREFIX_STRLEN];
struct nexthop *nexthop;
+ struct vrf *vrf = vrf_lookup_by_id(re->vrf_id);
- zlog_debug("%s: dumping RE entry %p for %s%s%s vrf %u", func,
+ zlog_debug("%s: dumping RE entry %p for %s%s%s vrf %s(%u)", func,
(const void *)re, prefix2str(pp, straddr, sizeof(straddr)),
is_srcdst ? " from " : "",
is_srcdst ? prefix2str(src_pp, srcaddr, sizeof(srcaddr))
: "",
- re->vrf_id);
+ VRF_LOGNAME(vrf), re->vrf_id);
zlog_debug("%s: uptime == %lu, type == %u, instance == %d, table == %d",
straddr, (unsigned long)re->uptime, re->type, re->instance,
re->table);