]> git.proxmox.com Git - mirror_frr.git/commit - bgpd/bgp_route.c
bgpd: Implement new adjacent route show commands
authorPascal Mathis <mail@pascalmathis.com>
Wed, 16 May 2018 17:17:42 +0000 (19:17 +0200)
committerPascal Mathis <mail@pascalmathis.com>
Wed, 16 May 2018 19:13:47 +0000 (21:13 +0200)
commit6392aaa6547e665859ab5c648df30c1c04e26f6d
tree4b04c7291b8d4bf8d073fa4696fe74083fe906ae
parent51f9d3e70ffa6e27fdb51ecc10b618091d518c28
bgpd: Implement new adjacent route show commands

This commit changes the behavior of `show bgp [afi] [safi] neighbor
<neighbor> received-routes [json]` to return all received prefixes
instead of filtering rejected/denied prefixes.

Compared to Cisco and Juniper products, this is the usual way how this
command is supposed to work, as `show bgp [afi] [safi] neighbor
<neighbor> routes` will already return all accepted prefixes.

Additionally, the new command `show bgp [afi] [safi] neighbor <neighbor>
filtered-routes` has been added, which returns a list of all prefixes
that got filtered away, so it can be roughly described as a subset of
"received prefixes - accepted prefixes".

As the already available `filtered_count` variable inside
`show_adj_route` has not been used before, the last output line
summarizing the amount of prefixes found was extended to also mention
the amount of filtered prefixes if present.

Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
bgpd/bgp_route.c
bgpd/bgp_route.h