From: Ondrej Zajicek (work) Date: Tue, 23 Jul 2019 15:02:41 +0000 (+0200) Subject: OSPF: Fix formatting of 'show ospf neighbors' X-Git-Tag: v2.0.5~12 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fbird.git;a=commitdiff_plain;h=048c2f0e8cc1451b1fa48e915e0bb5e124aa9d26 OSPF: Fix formatting of 'show ospf neighbors' The formatting was broken when too short router-id was used. --- diff --git a/proto/ospf/neighbor.c b/proto/ospf/neighbor.c index 112625c8a..30e806405 100644 --- a/proto/ospf/neighbor.c +++ b/proto/ospf/neighbor.c @@ -857,7 +857,7 @@ ospf_sh_neigh_info(struct ospf_neighbor *n) pos = "Other"; } - cli_msg(-1013, "%-1R\t%3u\t%s/%s\t%7t\t%-10s %-1I", + cli_msg(-1013, "%-12R\t%3u\t%s/%s\t%6t\t%-10s %I", n->rid, n->priority, ospf_ns_names[n->state], pos, tm_remains(n->inactim), ifa->ifname, n->ip); } diff --git a/proto/ospf/ospf.c b/proto/ospf/ospf.c index 57e578da6..ad4ddb615 100644 --- a/proto/ospf/ospf.c +++ b/proto/ospf/ospf.c @@ -805,7 +805,7 @@ ospf_sh_neigh(struct proto *P, char *iff) } cli_msg(-1013, "%s:", p->p.name); - cli_msg(-1013, "%-12s\t%3s\t%-15s\t%-5s\t%-10s %-12s", "Router ID", "Pri", + cli_msg(-1013, "%-12s\t%3s\t%-15s\t%-5s\t%-10s %s", "Router ID", "Pri", " State", "DTime", "Interface", "Router IP"); WALK_LIST(ifa, p->iface_list) if ((iff == NULL) || patmatch(iff, ifa->ifname))