if (IS_ZEBRA_DEBUG_RIB) {
zlog_debug(
- "%u:%s: Redist update re %p (type %d), old %p (type %d)",
+ "%u:%s: Redist update re %p (%s), old %p (%s)",
re->vrf_id, prefix2str(p, buf, sizeof(buf)),
- re, re->type, prev_re,
- prev_re ? prev_re->type : -1);
+ re, zebra_route_string(re->type), prev_re,
+ prev_re ? zebra_route_string(prev_re->type) : "None");
}
afi = family2afi(p->family);
if (IS_ZEBRA_DEBUG_RIB) {
inet_ntop(p->family, &p->u.prefix, buf, INET6_ADDRSTRLEN);
- zlog_debug("%u:%s/%d: Redist delete re %p (type %d)",
- re->vrf_id, buf, p->prefixlen, re, re->type);
+ zlog_debug("%u:%s/%d: Redist delete re %p (%s)",
+ re->vrf_id, buf, p->prefixlen, re,
+ zebra_route_string(re->type));
}
/* Add DISTANCE_INFINITY check. */
if (IS_ZEBRA_DEBUG_RIB) {
char buf[SRCDEST2STR_BUFFER];
srcdest_rnode2str(rn, buf, sizeof(buf));
- zlog_debug("%u:%s: Adding route rn %p, re %p (type %d)",
- zvrf_id(zvrf), buf, rn, new, new->type);
+ zlog_debug("%u:%s: Adding route rn %p, re %p (%s)",
+ zvrf_id(zvrf), buf, rn, new,
+ zebra_route_string(new->type));
}
/* If labeled-unicast route, install transit LSP. */
if (IS_ZEBRA_DEBUG_RIB) {
char buf[SRCDEST2STR_BUFFER];
srcdest_rnode2str(rn, buf, sizeof(buf));
- zlog_debug("%u:%s: Deleting route rn %p, re %p (type %d)",
- zvrf_id(zvrf), buf, rn, old, old->type);
+ zlog_debug("%u:%s: Deleting route rn %p, re %p (%s)",
+ zvrf_id(zvrf), buf, rn, old,
+ zebra_route_string(old->type));
}
/* If labeled-unicast route, uninstall transit LSP. */
srcdest_rnode2str(rn, buf, sizeof(buf));
if (new != old)
zlog_debug(
- "%u:%s: Updating route rn %p, re %p (type %d) "
- "old %p (type %d)",
+ "%u:%s: Updating route rn %p, re %p (%s) old %p (%s)",
zvrf_id(zvrf), buf, rn, new,
- new->type, old, old->type);
+ zebra_route_string(new->type),
+ old,
+ zebra_route_string(old->type));
else
zlog_debug(
- "%u:%s: Updating route rn %p, re %p (type %d)",
+ "%u:%s: Updating route rn %p, re %p (%s)",
zvrf_id(zvrf), buf, rn, new,
- new->type);
+ zebra_route_string(new->type));
}
/* If labeled-unicast route, uninstall transit LSP. */
srcdest_rnode2str(rn, buf, sizeof(buf));
if (new != old)
zlog_debug(
- "%u:%s: Deleting route rn %p, re %p (type %d) "
- "old %p (type %d) - nexthop inactive",
+ "%u:%s: Deleting route rn %p, re %p (%s) old %p (%s) - nexthop inactive",
zvrf_id(zvrf), buf, rn, new,
- new->type, old, old->type);
+ zebra_route_string(new->type),
+ old,
+ zebra_route_string(old->type));
else
zlog_debug(
- "%u:%s: Deleting route rn %p, re %p (type %d) - nexthop inactive",
+ "%u:%s: Deleting route rn %p, re %p (%s) - nexthop inactive",
zvrf_id(zvrf), buf, rn, new,
- new->type);
+ zebra_route_string(new->type));
}
/* If labeled-unicast route, uninstall transit LSP. */
RNODE_FOREACH_RE_SAFE (rn, re, next) {
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
zlog_debug(
- "%u:%s: Examine re %p (type %d) status %x flags %x "
- "dist %d metric %d",
- vrf_id, buf, re, re->type, re->status,
- re->flags, re->distance, re->metric);
+ "%u:%s: Examine re %p (%s) status %x flags %x dist %d metric %d",
+ vrf_id, buf, re, zebra_route_string(re->type),
+ re->status, re->flags, re->distance,
+ re->metric);
UNSET_FLAG(re->status, ROUTE_ENTRY_NEXTHOPS_CHANGED);
if (IS_ZEBRA_DEBUG_RIB) {
char buf[SRCDEST2STR_BUFFER];
srcdest_rnode2str(rn, buf, sizeof(buf));
- zlog_debug(
- "%u:%s: Freeing route rn %p, re %p (type %d)",
- re->vrf_id, buf, rn, re, re->type);
+ zlog_debug("%u:%s: Freeing route rn %p, re %p (%s)",
+ re->vrf_id, buf, rn, re,
+ zebra_route_string(re->type));
}
rib_unlink(rn, re);
/* Link new re to node.*/
if (IS_ZEBRA_DEBUG_RIB) {
- rnode_debug(
- rn, re->vrf_id,
- "Inserting route rn %p, re %p (type %d) existing %p",
- (void *)rn, (void *)re, re->type, (void *)same);
+ rnode_debug(rn, re->vrf_id,
+ "Inserting route rn %p, re %p (%s) existing %p",
+ rn, re, zebra_route_string(re->type), same);
if (IS_ZEBRA_DEBUG_RIB_DETAILED)
route_entry_dump(p, src_p, re);
*/
if (fib && CHECK_FLAG(flags, ZEBRA_FLAG_SELFROUTE)) {
if (IS_ZEBRA_DEBUG_RIB) {
- rnode_debug(
- rn, vrf_id,
- "rn %p, re %p (type %d) was deleted from kernel, adding",
- rn, fib, fib->type);
+ rnode_debug(rn, vrf_id,
+ "rn %p, re %p (%s) was deleted from kernel, adding",
+ rn, fib,
+ zebra_route_string(fib->type));
}
if (allow_delete) {
UNSET_FLAG(fib->status, ROUTE_ENTRY_INSTALLED);