summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_evpn_vty.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2022-08-15 17:24:42 +0200
committerDonald Sharp <sharpd@nvidia.com>2022-08-15 17:24:42 +0200
commit3e140309a3424d34fac7559dc26c3634e5fb2c1b (patch)
tree62ccad3ed7eaf3e37d4a9c93f1f6d0942d83ef12 /bgpd/bgp_evpn_vty.c
parentzebra: Remove unused assignment in zebra_dplane.c (diff)
downloadfrr-3e140309a3424d34fac7559dc26c3634e5fb2c1b.tar.xz
frr-3e140309a3424d34fac7559dc26c3634e5fb2c1b.zip
bgpd: Ensure bgp_vrf is non-null
When calling VTY_GET_CONTEXT to get the bgp pointer, FRR needs to ensure that the pointer is valid. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'bgpd/bgp_evpn_vty.c')
-rw-r--r--bgpd/bgp_evpn_vty.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/bgpd/bgp_evpn_vty.c b/bgpd/bgp_evpn_vty.c
index 797075563..6ba516c39 100644
--- a/bgpd/bgp_evpn_vty.c
+++ b/bgpd/bgp_evpn_vty.c
@@ -4036,6 +4036,9 @@ DEFUN (no_bgp_evpn_advertise_type5,
afi_t afi = 0;
safi_t safi = 0;
+ if (!bgp_vrf)
+ return CMD_WARNING;
+
argv_find_and_parse_afi(argv, argc, &idx_afi, &afi);
argv_find_and_parse_safi(argv, argc, &idx_safi, &safi);