]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: fixed misaligned columns in BGP routes table 12199/head
authorWayne Morrison <wmorrison@netgate.com>
Tue, 25 Oct 2022 14:45:35 +0000 (10:45 -0400)
committerWayne Morrison <wmorrison@netgate.com>
Tue, 25 Oct 2022 14:45:35 +0000 (10:45 -0400)
Column headers in BGP routes table are not aligned with data when
RPKI status is available.  This was fixed to insert a space at the
beginning of the header and at the beginning of lines that do not
have RPKI status.

This fix requires that several testing templates be adjusted to
match the new output.

Signed-off-by: Wayne Morrison <wmorrison@netgate.com>
bgpd/bgp_route.c
bgpd/bgp_route.h
tests/topotests/all_protocol_startup/r1/show_bgp_ipv4-post4.1.ref
tests/topotests/all_protocol_startup/r1/show_bgp_ipv4-post5.0.ref
tests/topotests/all_protocol_startup/r1/show_bgp_ipv4-post6.1.ref
tests/topotests/all_protocol_startup/r1/show_bgp_ipv4.ref
tests/topotests/all_protocol_startup/r1/show_bgp_ipv6-post4.1.ref
tests/topotests/all_protocol_startup/r1/show_bgp_ipv6.ref
tests/topotests/all_protocol_startup/r1/show_bgp_ipv6_post6.1.ref

index f6b6cb93dbc9df91dfc252d796c361e69bc2c107..50567f43206d0604b25c8c3955e0a07585b0452a 100644 (file)
@@ -9035,6 +9035,8 @@ static void route_vty_short_status_out(struct vty *vty,
                vty_out(vty, "I");
        else if (rpki_state == RPKI_NOTFOUND)
                vty_out(vty, "N");
+       else
+               vty_out(vty, " ");
 
        /* Route status display. */
        if (CHECK_FLAG(path->flags, BGP_PATH_REMOVED))
index 7c6e60bd9267d10d6a7b8b2dc99ba1e4b65a8e3c..dfe741914d306402d06b8c55551c095873bec34d 100644 (file)
@@ -80,7 +80,7 @@ enum bgp_show_adj_route_type {
 #define BGP_SHOW_NCODE_HEADER "Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self\n"
 #define BGP_SHOW_RPKI_HEADER                                                   \
        "RPKI validation codes: V valid, I invalid, N Not found\n\n"
-#define BGP_SHOW_HEADER "   Network          Next Hop            Metric LocPrf Weight Path\n"
+#define BGP_SHOW_HEADER "    Network          Next Hop            Metric LocPrf Weight Path\n"
 #define BGP_SHOW_HEADER_WIDE "   Network                                      Next Hop                                  Metric LocPrf Weight Path\n"
 
 /* Maximum number of labels we can process or send with a prefix. We
index b38701a53d94a2029b4e066795249940f87cf35b..b2e8de5ce13bfbca957ee0d93c861e9c76a3ab0c 100644 (file)
@@ -5,5 +5,5 @@ Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
 Origin codes:  i - IGP, e - EGP, ? - incomplete
 RPKI validation codes: V valid, I invalid, N Not found
 
-   Network          Next Hop            Metric LocPrf Weight Path
-*> 192.168.0.0      0.0.0.0                  0         32768 i
+    Network          Next Hop            Metric LocPrf Weight Path
+ *> 192.168.0.0      0.0.0.0                  0         32768 i
index 82b64c0d98d8fa51c26502d8e136927a927025ed..7bee704182edff3caf208f0b93499a0ffa15ee00 100644 (file)
@@ -5,5 +5,5 @@ Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
 Origin codes:  i - IGP, e - EGP, ? - incomplete
 RPKI validation codes: V valid, I invalid, N Not found
 
-   Network          Next Hop            Metric LocPrf Weight Path
-*> 192.168.0.0/24   0.0.0.0                  0         32768 i
+    Network          Next Hop            Metric LocPrf Weight Path
+ *> 192.168.0.0/24   0.0.0.0                  0         32768 i
index fd333b3084cc96a102c00e1504c20505b5f2aa90..31071e760d467d24d826ab82d1a029426e893b41 100644 (file)
@@ -6,5 +6,5 @@ Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
 Origin codes:  i - IGP, e - EGP, ? - incomplete
 RPKI validation codes: V valid, I invalid, N Not found
 
-   Network          Next Hop            Metric LocPrf Weight Path
-*> 192.168.0.0/24   0.0.0.0                  0         32768 i
+    Network          Next Hop            Metric LocPrf Weight Path
+ *> 192.168.0.0/24   0.0.0.0                  0         32768 i
index 3be6cd3d7b1ba656e3d02567b7639ac0db2e0097..53c4793bf4ce099134c5efafab7777fe883dc89e 100644 (file)
@@ -3,5 +3,5 @@ Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
 Origin codes: i - IGP, e - EGP, ? - incomplete
 
-   Network          Next Hop            Metric LocPrf Weight Path
-*> 192.168.0.0      0.0.0.0                  0         32768 i
+    Network          Next Hop            Metric LocPrf Weight Path
+ *> 192.168.0.0      0.0.0.0                  0         32768 i
index 20034b7408826a4632868e0dbdf93a681f2c6573..fe3f0720d81449a617532dc5330449c73d2f550b 100644 (file)
@@ -5,5 +5,5 @@ Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
 Origin codes:  i - IGP, e - EGP, ? - incomplete
 RPKI validation codes: V valid, I invalid, N Not found
 
-   Network          Next Hop            Metric LocPrf Weight Path
-*> fc00::/64        ::                       0         32768 i
+    Network          Next Hop            Metric LocPrf Weight Path
+ *> fc00::/64        ::                       0         32768 i
index fffee63c6b5e6be5c65c137427483a395fbe3c5d..363b4f5349e233c268dc7be6e48904aa05efcb3d 100644 (file)
@@ -3,5 +3,5 @@ Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
 Origin codes: i - IGP, e - EGP, ? - incomplete
 
-   Network          Next Hop            Metric LocPrf Weight Path
-*> fc00::/64        ::                       0         32768 i
+    Network          Next Hop            Metric LocPrf Weight Path
+ *> fc00::/64        ::                       0         32768 i
index 5b5f8596cfa1f39a01a0b934f1830068232248e1..8c3229b45d00dde0cadef4ab51912bede3077786 100644 (file)
@@ -6,5 +6,5 @@ Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
 Origin codes:  i - IGP, e - EGP, ? - incomplete
 RPKI validation codes: V valid, I invalid, N Not found
 
-   Network          Next Hop            Metric LocPrf Weight Path
-*> fc00::/64        ::                       0         32768 i
+    Network          Next Hop            Metric LocPrf Weight Path
+ *> fc00::/64        ::                       0         32768 i