From aed366cf4692a9637b8aad5d62fef3f0d45a47d0 Mon Sep 17 00:00:00 2001 From: Daniel Walton Date: Wed, 27 Sep 2017 16:07:24 +0000 Subject: [PATCH] bgpd: fix 4-byte AS display in bestpath-from-AS Signed-off-by: Daniel Walton Before ====== cel-redxp-10# show ip bgp 20.1.3.0/24 BGP routing table entry for 20.1.3.0/24 Paths: (1 available, best #1, table Default-IP-Routing-Table) Advertised to non peer-group peers: top1(10.1.1.2) bottom0(20.1.2.2) 4294967292 20.1.2.2 from bottom0(20.1.2.2) (20.1.1.1) Origin IGP, metric 0, localpref 100, valid, external, bestpath-from-AS -4, best Community: 99:1 AddPath ID: RX 0, TX 92 Last update: Wed Sep 27 16:02:34 2017 cel-redxp-10# After ===== cel-redxp-10# show ip bgp 20.1.3.0/24 BGP routing table entry for 20.1.3.0/24 Paths: (1 available, best #1, table Default-IP-Routing-Table) Advertised to non peer-group peers: bottom0(20.1.2.2) 4294967292 20.1.2.2 from bottom0(20.1.2.2) (20.1.1.1) Origin IGP, metric 0, localpref 100, valid, external, bestpath-from-AS 4294967292, best Community: 99:1 AddPath ID: RX 0, TX 2 Last update: Wed Sep 27 16:07:09 2017 cel-redxp-10# --- bgpd/bgp_route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 44b3c5c34856..d8bae62df1da 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -7841,7 +7841,7 @@ void route_vty_out_detail(struct vty *vty, struct bgp *bgp, struct prefix *p, "bestpathFromAs", first_as); } else { if (first_as) - vty_out(vty, ", bestpath-from-AS %d", + vty_out(vty, ", bestpath-from-AS %u", first_as); else vty_out(vty,