bgpd: Check if we have such a peer before handling software capability

Do not pass NULL for peer_established(), just in case.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
Donatas Abraitis 2023-08-03 22:00:27 +03:00
parent f3279abe13
commit 7636bcc765

View File

@ -5728,8 +5728,8 @@ DEFPY(neighbor_capability_software_version,
int ret;
peer = peer_and_group_lookup_vty(vty, neighbor);
if (peer && peer->conf_if)
return CMD_SUCCESS;
if (!peer)
return CMD_WARNING_CONFIG_FAILED;
if (no)
ret = peer_flag_unset_vty(vty, neighbor,