summaryrefslogtreecommitdiff
path: root/ospfd/ospf_route.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2020-03-24 17:38:20 +0100
committerDavid Lamparter <equinox@diac24.net>2020-03-24 18:47:12 +0100
commitd6951e5ef9d0dc529dd94871f7186ca19b0459c8 (patch)
tree67f4482ef1d8f4b57f546adee863d7d9c7af65d4 /ospfd/ospf_route.c
parent0a8138dc7429c4a6071a911cab7bc2db8981c2ba (diff)
*: remove tabs from log messages
Some logging systems are, er, "allergic" to tabs in log messages. (RFC5424: "The syslog application SHOULD avoid octet values below 32") Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'ospfd/ospf_route.c')
-rw-r--r--ospfd/ospf_route.c25
1 files changed, 5 insertions, 20 deletions
diff --git a/ospfd/ospf_route.c b/ospfd/ospf_route.c
index b6e8338ee7..a661c80a91 100644
--- a/ospfd/ospf_route.c
+++ b/ospfd/ospf_route.c
@@ -631,27 +631,15 @@ void ospf_route_table_dump(struct route_table *rt)
{
struct route_node *rn;
struct ospf_route * or ;
- char buf1[BUFSIZ];
- char buf2[BUFSIZ];
struct listnode *pnode;
struct ospf_path *path;
-#if 0
- zlog_debug ("Type Dest Area Path Type Cost Next Adv.");
- zlog_debug (" Hop(s) Router(s)");
-#endif /* 0 */
-
zlog_debug("========== OSPF routing table ==========");
for (rn = route_top(rt); rn; rn = route_next(rn))
if ((or = rn->info) != NULL) {
if (or->type == OSPF_DESTINATION_NETWORK) {
- zlog_debug("N %s/%d\t%s\t%s\t%d",
- inet_ntop(AF_INET, &rn->p.u.prefix4,
- buf1, BUFSIZ),
- rn->p.prefixlen,
- inet_ntop(AF_INET,
- & or->u.std.area_id, buf2,
- BUFSIZ),
+ zlog_debug("N %-18pFX %-15pI4 %s %d", &rn->p,
+ &or->u.std.area_id,
ospf_path_type_str[or->path_type],
or->cost);
for (ALL_LIST_ELEMENTS_RO(or->paths, pnode,
@@ -659,12 +647,9 @@ void ospf_route_table_dump(struct route_table *rt)
zlog_debug(" -> %s",
inet_ntoa(path->nexthop));
} else
- zlog_debug("R %s\t%s\t%s\t%d",
- inet_ntop(AF_INET, &rn->p.u.prefix4,
- buf1, BUFSIZ),
- inet_ntop(AF_INET,
- & or->u.std.area_id, buf2,
- BUFSIZ),
+ zlog_debug("R %-18pI4 %-15pI4 %s %d",
+ &rn->p.u.prefix4,
+ &or->u.std.area_id,
ospf_path_type_str[or->path_type],
or->cost);
}