return CMD_SUCCESS;
}
-static int
-bgp_show_summary_afi_safi_peer (struct peer *peer, int afi, int safi)
-{
- if (peer->afc[afi][safi])
- return 1;
-
- /* The peer is doing 'ipv4 labeled-unicast' but we put those routes in
- * the 'ipv4 unicast' table so return True for SAFI_UNICAST if they are
- * doing SAFI_LABELED_UNICAST
- */
- if (safi == SAFI_UNICAST && peer->afc[afi][SAFI_LABELED_UNICAST])
- return 1;
-
- return 0;
-}
-
/* Show BGP peer's summary information. */
static int
bgp_show_summary (struct vty *vty, struct bgp *bgp, int afi, int safi,
if (!CHECK_FLAG(peer->flags, PEER_FLAG_CONFIG_NODE))
continue;
- if (bgp_show_summary_afi_safi_peer (peer, afi, safi))
+ if (peer->afc[afi][safi])
{
memset(dn_flag, '\0', sizeof(dn_flag));
if (peer_dynamic_neighbor(peer))
if (!CHECK_FLAG(peer->flags, PEER_FLAG_CONFIG_NODE))
continue;
- if (bgp_show_summary_afi_safi_peer (peer, afi, safi))
+ if (peer->afc[afi][safi])
{
if (!count)
{
if (peer->afc[afi][safi])
return 1;
-
- /* The peer is doing 'ipv4 labeled-unicast' but we put those routes in
- * the 'ipv4 unicast' table so return True for SAFI_UNICAST if they are
- * doing SAFI_LABELED_UNICAST
- */
- if (safi == SAFI_UNICAST && peer->afc[afi][SAFI_LABELED_UNICAST])
- return 1;
}
return 0;
safi = 1; /* SAFI_UNICAST */
while (safi < SAFI_MAX)
{
-
- /* SAFI_LABELED_UNICAST routes are treated as SAFI_UNICAST
- * so do not display a summary
- */
- if (safi == SAFI_LABELED_UNICAST)
- {
- safi++;
- continue;
- }
-
if (bgp_show_summary_afi_safi_peer_exists (bgp, afi, safi))
{
json_output = true;
/* `show [ip] bgp summary' commands. */
DEFUN (show_ip_bgp_summary,
show_ip_bgp_summary_cmd,
- "show [ip] bgp [<view|vrf> VIEWVRFNAME] ["BGP_AFI_CMD_STR" ["BGP_SAFI_CMD_STR"]] summary [json]",
+ "show [ip] bgp [<view|vrf> VIEWVRFNAME] ["BGP_AFI_CMD_STR" ["BGP_SAFI_WITH_LABEL_CMD_STR"]] summary [json]",
SHOW_STR
IP_STR
BGP_STR
BGP_INSTANCE_HELP_STR
BGP_AFI_HELP_STR
- BGP_SAFI_HELP_STR
+ BGP_SAFI_WITH_LABEL_HELP_STR
"Summary of BGP neighbor status\n"
JSON_STR)
{
return CMD_SUCCESS;
}
-// dwalton one "show ip route" to rule them all
DEFUN (show_ip_route,
show_ip_route_cmd,
"show ip <fib|route> [vrf NAME] [tag (1-4294967295)|A.B.C.D/M longer-prefixes|supernets-only|" FRR_IP_REDIST_STR_ZEBRA "|ospf (1-65535)] [json]",
tag, distance, vrf, NULL);
}
-// dwalton duplicate to here
DEFUN (show_ipv6_route,
show_ipv6_route_cmd,
"show ipv6 <fib|route> [vrf NAME] [tag (1-4294967295)|X:X::X:X/M longer-prefixes|" FRR_IP6_REDIST_STR_ZEBRA "] [json]",