]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
OSPF: Fix formatting of 'show ospf neighbors'
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Tue, 23 Jul 2019 15:02:41 +0000 (17:02 +0200)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Tue, 23 Jul 2019 15:02:41 +0000 (17:02 +0200)
The formatting was broken when too short router-id was used.

proto/ospf/neighbor.c
proto/ospf/ospf.c

index 112625c8af48b1fea05def4259935f1845169ea3..30e806405c7365ad959056ac732ee8bb12cecac0 100644 (file)
@@ -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);
 }
index 57e578da65fac5a77b886ef726b987931ca1c28b..ad4ddb615bf6da7203e0805ae3952742cde98cea 100644 (file)
@@ -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))