From 3e140309a3424d34fac7559dc26c3634e5fb2c1b Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 15 Aug 2022 11:24:42 -0400 Subject: 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 --- bgpd/bgp_evpn_vty.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bgpd') 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); -- cgit v1.2.3