Commit ff94d9f5 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Tweak debug logging of non-specific routes.

parent 96134b42
...@@ -1074,10 +1074,12 @@ dump_route(FILE *out, struct babel_route *route) ...@@ -1074,10 +1074,12 @@ dump_route(FILE *out, struct babel_route *route)
snprintf(channels + j, 100 - j, ")"); snprintf(channels + j, 100 - j, ")");
} }
fprintf(out, "%s from %s metric %d (%d) refmetric %d id %s " fprintf(out, "%s%s%s metric %d (%d) refmetric %d id %s "
"seqno %d%s age %d via %s neigh %s%s%s%s\n", "seqno %d%s age %d via %s neigh %s%s%s%s\n",
format_prefix(route->src->prefix, route->src->plen), format_prefix(route->src->prefix, route->src->plen),
format_prefix(route->src->src_prefix, route->src->src_plen), route->src->src_plen > 0 ? " from " : "",
route->src->src_plen > 0 ?
format_prefix(route->src->src_prefix, route->src->src_plen) : "",
route_metric(route), route_smoothed_metric(route), route->refmetric, route_metric(route), route_smoothed_metric(route), route->refmetric,
format_eui64(route->src->id), format_eui64(route->src->id),
(int)route->seqno, (int)route->seqno,
...@@ -1094,9 +1096,11 @@ dump_route(FILE *out, struct babel_route *route) ...@@ -1094,9 +1096,11 @@ dump_route(FILE *out, struct babel_route *route)
static void static void
dump_xroute(FILE *out, struct xroute *xroute) dump_xroute(FILE *out, struct xroute *xroute)
{ {
fprintf(out, "%s from %s metric %d (exported)\n", fprintf(out, "%s%s%s metric %d (exported)\n",
format_prefix(xroute->prefix, xroute->plen), format_prefix(xroute->prefix, xroute->plen),
format_prefix(xroute->src_prefix, xroute->src_plen), xroute->src_plen > 0 ? " from " : "",
xroute->src_plen > 0 ?
format_prefix(xroute->src_prefix, xroute->src_plen) : "",
xroute->metric); xroute->metric);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment