mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-03 16:59:31 +00:00
bgpd: Ensure bgp_vrf is non-null
If we attempt to get the bgp_vrf and it fails then ensure that we don't just de-ref and crash. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
bc479b1b17
commit
332133d19b
@ -4305,7 +4305,7 @@ DEFPY (bgp_evpn_advertise_pip_ip_mac,
|
||||
struct bgp *bgp_vrf = VTY_GET_CONTEXT(bgp); /* bgp vrf instance */
|
||||
struct bgp *bgp_evpn = NULL;
|
||||
|
||||
if (EVPN_ENABLED(bgp_vrf)) {
|
||||
if (!bgp_vrf || EVPN_ENABLED(bgp_vrf)) {
|
||||
vty_out(vty,
|
||||
"This command is supported under L3VNI BGP EVPN VRF\n");
|
||||
return CMD_WARNING_CONFIG_FAILED;
|
||||
|
Loading…
Reference in New Issue
Block a user