Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bgpd: fix display json value of interface for BGP unnumbered
The 'show bgp ipv[4,6] json' command does not display the interface value of the nexthop, when BGP sessions are unnumbered, whereas the non json output displays it correctly. The below example indicates 'r1-eth0' wheras in json, the value is not displayed. > r1# show bgp ipv4 > BGP table version is 3, local router ID is 10.254.254.1, vrf id 0 > Default local pref 100, local AS 101 > Status codes: s suppressed, d damped, h history, u unsorted, * valid, > best, = multipath, > i internal, r RIB-failure, S Stale, R Removed > 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 > *> 10.254.254.1/32 0.0.0.0 0 32768 ? > *> 10.254.254.2/32 r1-eth0 0 0 102 ? > > Displayed 2 routes and 2 total paths Fix this by adding an 'interface' keyword in the json attributes. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>