File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -280,20 +280,23 @@ static inline void bgpevpn_link_to_l3vni(struct bgpevpn *vpn)
280280 if (vpn -> bgp_vrf )
281281 return ;
282282
283+ /* bail if VRF still doesn't exist */
283284 bgp_vrf = bgp_lookup_by_vrf_id (vpn -> tenant_vrf_id );
284285 if (!bgp_vrf )
285286 return ;
286287
288+ /* or if there is no l3vni */
289+ if (!bgp_vrf -> l3vni )
290+ return ;
291+
287292 /* associate the vpn to the bgp_vrf instance */
288293 vpn -> bgp_vrf = bgp_lock (bgp_vrf );
289294 listnode_add_sort (bgp_vrf -> l2vnis , vpn );
290295
291296 /*
292- * If L3VNI is configured,
293297 * check if we are advertising two labels for this vpn
294298 */
295- if (bgp_vrf -> l3vni &&
296- !CHECK_FLAG (bgp_vrf -> vrf_flags , BGP_VRF_L3VNI_PREFIX_ROUTES_ONLY ))
299+ if (!CHECK_FLAG (bgp_vrf -> vrf_flags , BGP_VRF_L3VNI_PREFIX_ROUTES_ONLY ))
297300 SET_FLAG (vpn -> flags , VNI_FLAG_USE_TWO_LABELS );
298301
299302 bgp_evpn_es_evi_vrf_ref (vpn );
You can’t perform that action at this time.
0 commit comments