bgpd: Fix `received-routes detail`
The command `show bgp ipv4 uni neigh A.B.C.D received-routes detail`
was not displaying anything.
Fix the code to display the received routes from the ones that
have been filtered. In this case we need to fudge up a bgp_dest
and a bgp_path_info to make it work.
Old output:
janelle.pinkbelly.org# show bgp ipv4 uni neighbors 192.168.119.224 received-routes detail
BGP table version is
1711405, local router ID is 192.168.44.1, vrf id 0
Default local pref 100, local AS 64539
Total number of prefixes 3 (3 filtered)
janelle.pinkbelly.org#
New output:
janelle.pinkbelly.org# show bgp ipv4 uni neighbors 192.168.119.224 received-routes detail
BGP table version is 0, local router ID is 192.168.44.1, vrf id 0
Default local pref 100, local AS 64539
BGP routing table entry for 1.2.3.0/24, version 0
Paths: (1 available, no best path)
Not advertised to any peer
3291, (aggregated by 3291 192.168.122.1)
192.168.119.224 (inaccessible, import-check enabled) from 192.168.119.224 (192.168.122.1)
Origin IGP, metric 0, invalid, external, atomic-aggregate, rpki validation-state: not found
Community: 55:66
Last update: Fri Apr 14 08:46:48 2023
BGP routing table entry for 1.2.3.4/32, version 0
Paths: (1 available, no best path)
Not advertised to any peer
3291
192.168.119.224 (inaccessible, import-check enabled) from 192.168.119.224 (192.168.122.1)
Origin IGP, metric 0, invalid, external, rpki validation-state: not found
Community: 33:44
Last update: Fri Apr 14 08:46:48 2023
BGP routing table entry for 1.2.3.5/32, version 0
Paths: (1 available, no best path)
Not advertised to any peer
3291
192.168.119.224 (inaccessible, import-check enabled) from 192.168.119.224 (192.168.122.1)
Origin IGP, metric 0, invalid, external, rpki validation-state: not found
Community: 33:44
Last update: Fri Apr 14 08:46:48 2023
Total number of prefixes 3 (3 filtered)
janelle.pinkbelly.org# show bgp ipv4 uni
No BGP prefixes displayed, 0 exist
janelle.pinkbelly.org#
Signed-off-by: Donald Sharp <sharpd@nvidia.com>