]> git.proxmox.com Git - mirror_frr.git/commit - bgpd/bgp_route.c
bgpd: when showing routes, add nexthop vrf and announce-self flag
authorG. Paul Ziemba <paulz@labn.net>
Mon, 9 Apr 2018 20:28:11 +0000 (13:28 -0700)
committerG. Paul Ziemba <paulz@labn.net>
Sat, 28 Apr 2018 00:34:43 +0000 (17:34 -0700)
commit9df8b37c72854fc965c452d17ef38bf4aae8dfee
tree71c930db8c2329a2dafc4817cd49f75ffeabd679
parentd90b2b73cb174e781b796d2f9c7a9075e4327a59
bgpd: when showing routes, add nexthop vrf and announce-self flag

As part of recent vpn-vrf leaking changes, it is now possible for a
route to refer to a nexthop in a different vrf. There is also a new
route flag that means "when announcing this route, indicate myself
as the next-hop."

route_vty_out(): nexthops are appended with:

    "@VRFID" (where VRFID is the numerical vrf id) when different from
    the route's vrf;

    "<" when the route's BGP_INFO_ANNC_NH_SELF is set

This change also shows the route table's vrf id in the table header.

route_vty_out_detail(): show nexthop's vrf and announce-nh-self flag if
appropriate.

Both functions are also augmented to add json elements nhVrfId, nhVrfName,
and announceNexthopSelf as appropriate.

The intent of these changes is to make it easier to understand/debug
the relationship between a route and its nexthops.

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
bgpd/bgp_route.c
bgpd/bgp_route.h