bgpd: fix crash in "show ip bgp ... all alias ALIAS"

Like done in the other places (when "all" isn't used), pass the
actual alias name to bgp_show() instead of a null pointer.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
This commit is contained in:
Renato Westphal 2021-07-27 22:29:43 -03:00
parent 4ac61f7a2a
commit db58b09fea

View File

@ -12342,6 +12342,11 @@ DEFPY(show_ip_bgp_json, show_ip_bgp_json_cmd,
sh_type, prefix_version, sh_type, prefix_version,
show_flags, show_flags,
rpki_target_state); rpki_target_state);
else if (bgp_community_alias)
return bgp_show(
vty, bgp, afi, safi, sh_type,
bgp_community_alias, show_flags,
rpki_target_state);
else else
bgp_show(vty, bgp, afi, safi, sh_type, bgp_show(vty, bgp, afi, safi, sh_type,
NULL, show_flags, NULL, show_flags,