]> git.proxmox.com Git - mirror_frr.git/commit
bgpd: Fix `received-routes detail`
authorDonald Sharp <sharpd@nvidia.com>
Tue, 25 Apr 2023 19:35:19 +0000 (15:35 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Tue, 25 Apr 2023 19:37:02 +0000 (15:37 -0400)
commit24dede9b3022e11a4031bb3566206416145a53da
tree07f562af14b181f01fe15c89c9a3813bc6719007
parent4dbef8567bda06418e8d1aeb566aab4d2593a65e
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>
bgpd/bgp_route.c