From c84355a93212939e98084137aa927ab911305614 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 25 Oct 2019 09:06:26 -0400 Subject: [PATCH] ospfd: interface name and ip address can be 32 bytes We are only saving 20 bytes of string output for ospf neighbor commands. Fixed output: act-7326-05# show ip ospf vrf vrf1012 neighbor all VRF Name: vrf1012 Neighbor ID Pri State Dead Time Address Interface RXmtL RqstL DBsmL 9.9.12.11 1 Full/DROther 39.973s 200.254.2.10 swp49s0.2:200.254.2.9 4 0 0 9.9.12.12 1 Full/DROther 39.995s 200.254.2.14 swp49s1.2:200.254.2.13 9 0 0 9.9.12.13 1 Exchange/DROthe 39.981s 200.254.2.18 swp49s2.2:200.254.2.17 157 0 0 Signed-off-by: Donald Sharp --- ospfd/ospf_vty.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index 4c97615ed1..14455b23fd 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -4154,7 +4154,7 @@ DEFUN (show_ip_ospf_interface_traffic, static void show_ip_ospf_neighbour_header(struct vty *vty) { - vty_out(vty, "\n%-15s %3s %-15s %9s %-15s %-20s %5s %5s %5s\n", + vty_out(vty, "\n%-15s %3s %-15s %9s %-15s %-32s %5s %5s %5s\n", "Neighbor ID", "Pri", "State", "Dead Time", "Address", "Interface", "RXmtL", "RqstL", "DBsmL"); } @@ -4260,7 +4260,7 @@ static void show_ip_ospf_neighbor_sub(struct vty *vty, timebuf, sizeof(timebuf))); vty_out(vty, "%-15s ", inet_ntoa(nbr->src)); - vty_out(vty, "%-20s %5ld %5ld %5d\n", + vty_out(vty, "%-32s %5ld %5ld %5d\n", IF_NAME(oi), ospf_ls_retransmit_count(nbr), ospf_ls_request_count(nbr), @@ -4524,7 +4524,7 @@ static int show_ip_ospf_neighbor_all_common(struct vty *vty, struct ospf *ospf, "-", nbr_nbma->priority, "Down", "-"); vty_out(vty, - "%-15s %-20s %5d %5d %5d\n", + "%-32s %-20s %5d %5d %5d\n", inet_ntoa(nbr_nbma->addr), IF_NAME(oi), 0, 0, 0); }