diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2016-12-19 14:43:25 -0200 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2017-01-03 22:03:28 -0200 |
| commit | 6bfae35e5c7b020a7ffca41dbe0eefc77ff003c2 (patch) | |
| tree | ca6d69c5d7941e9a3fbb5a4741164140f1247d87 | |
| parent | 07bc3833841ec104b10f48d936da18aaf6ddcf29 (diff) | |
ospf6d: fix broken indentation in "show ipv6 ospf6 neighbor"
In the State/IfState column, we were reserving only 6 characters to
print the state of each neighbor, but this is not enough for cases like
"Loading" (7 characters) and "ExChange" (8 characters). Increase the
width of this field to 8 to fix the broken indendation.
ospf6d's output before this patch:
ubuntu# show ipv6 ospf6 neighbor
Neighbor ID Pri DeadTime State/IfState Duration I/F[State]
2.2.2.2 1 00:00:35 ExChange/DR 00:01:15 rt1-eth0[BDR]
3.3.3.3 1 00:00:35 Loading/DR 00:01:15 rt1-eth1[BDR]
4.4.4.4 1 00:00:35 Full/DR 00:01:15 rt1-eth2[BDR]
5.5.5.5 1 00:00:35 None/DR 00:01:10 rt1-eth3[BDR]
6.6.6.6 1 00:00:35 Down/DR 00:01:15 rt1-eth4[BDR]
7.7.7.7 1 00:00:35 Attempt/DR 00:01:15 rt1-eth5[BDR]
8.8.8.8 1 00:00:35 Init/DR 00:01:10 rt1-eth6[BDR]
9.9.9.9 1 00:00:35 Twoway/DR 00:01:14 rt1-eth7[BDR]
10.10.10.10 1 00:00:35 ExStart/DR 00:01:10 rt1-eth8[BDR]
ospf6d's output with this patch:
ubuntu# show ipv6 ospf6 neighbor
Neighbor ID Pri DeadTime State/IfState Duration I/F[State]
2.2.2.2 1 00:00:36 ExChange/DR 00:00:44 rt1-eth0[BDR]
3.3.3.3 1 00:00:36 Loading/DR 00:00:39 rt1-eth1[BDR]
4.4.4.4 1 00:00:35 Full/DR 00:00:39 rt1-eth2[BDR]
5.5.5.5 1 00:00:36 None/DR 00:00:44 rt1-eth3[BDR]
6.6.6.6 1 00:00:36 Down/DR 00:00:39 rt1-eth4[BDR]
7.7.7.7 1 00:00:36 Attempt/DR 00:00:39 rt1-eth5[BDR]
8.8.8.8 1 00:00:36 Init/DR 00:00:39 rt1-eth6[BDR]
9.9.9.9 1 00:00:35 Twoway/DR 00:00:40 rt1-eth7[BDR]
10.10.10.10 1 00:00:36 ExStart/DR 00:00:39 rt1-eth8[BDR]
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
| -rw-r--r-- | ospf6d/ospf6_neighbor.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ospf6d/ospf6_neighbor.c b/ospf6d/ospf6_neighbor.c index f24ee84c8e..e9bb2493ff 100644 --- a/ospf6d/ospf6_neighbor.c +++ b/ospf6d/ospf6_neighbor.c @@ -682,7 +682,7 @@ ospf6_neighbor_show (struct vty *vty, struct ospf6_neighbor *on) "I/F", "State", VNL); */ - vty_out (vty, "%-15s %3d %11s %6s/%-12s %11s %s[%s]%s", + vty_out (vty, "%-15s %3d %11s %8s/%-12s %11s %s[%s]%s", router_id, on->priority, deadtime, ospf6_neighbor_state_str[on->state], nstate, duration, on->ospf6_if->interface->name, @@ -711,7 +711,7 @@ ospf6_neighbor_show_drchoice (struct vty *vty, struct ospf6_neighbor *on) timersub (&now, &on->last_changed, &res); timerstring (&res, duration, sizeof (duration)); - vty_out (vty, "%-15s %6s/%-11s %-15s %-15s %s[%s]%s", + vty_out (vty, "%-15s %8s/%-11s %-15s %-15s %s[%s]%s", router_id, ospf6_neighbor_state_str[on->state], duration, drouter, bdrouter, on->ospf6_if->interface->name, ospf6_interface_state_str[on->ospf6_if->state], @@ -856,11 +856,11 @@ DEFUN (show_ipv6_ospf6_neighbor, } if (showfunc == ospf6_neighbor_show) - vty_out (vty, "%-15s %3s %11s %6s/%-12s %11s %s[%s]%s", + vty_out (vty, "%-15s %3s %11s %8s/%-12s %11s %s[%s]%s", "Neighbor ID", "Pri", "DeadTime", "State", "IfState", "Duration", "I/F", "State", VNL); else if (showfunc == ospf6_neighbor_show_drchoice) - vty_out (vty, "%-15s %6s/%-11s %-15s %-15s %s[%s]%s", + vty_out (vty, "%-15s %8s/%-11s %-15s %-15s %s[%s]%s", "RouterID", "State", "Duration", "DR", "BDR", "I/F", "State", VNL); |
