@@ -527,7 +527,7 @@ int delete_global_ead_evi_routes(struct bgp *bgp, struct bgpevpn *vpn)
527527{
528528 afi_t afi ;
529529 safi_t safi ;
530- struct bgp_dest * rdrn , * rn ;
530+ struct bgp_dest * rdrn , * bd ;
531531 struct bgp_table * table ;
532532 struct bgp_path_info * pi ;
533533
@@ -543,15 +543,15 @@ int delete_global_ead_evi_routes(struct bgp *bgp, struct bgpevpn *vpn)
543543 * Iterate over all the routes in this table and delete EAD/EVI
544544 * routes
545545 */
546- for (rn = bgp_table_top (table ); rn ; rn = bgp_route_next (rn )) {
547- struct prefix_evpn * evp = (struct prefix_evpn * )& rn -> p ;
546+ for (bd = bgp_table_top (table ); bd ; bd = bgp_route_next (bd )) {
547+ struct prefix_evpn * evp = (struct prefix_evpn * )& bd -> rn -> p ;
548548
549549 if (evp -> prefix .route_type != BGP_EVPN_AD_ROUTE )
550550 continue ;
551551
552- delete_evpn_route_entry (bgp , afi , safi , rn , & pi );
552+ delete_evpn_route_entry (bgp , afi , safi , bd , & pi );
553553 if (pi )
554- bgp_process (bgp , rn , afi , safi );
554+ bgp_process (bgp , bd , afi , safi );
555555 }
556556 }
557557
@@ -1583,7 +1583,7 @@ static void bgp_evpn_path_es_unlink(struct bgp_path_es_info *es_info)
15831583 pi = es_info -> pi ;
15841584 if (BGP_DEBUG (evpn_mh , EVPN_MH_RT ))
15851585 zlog_debug ("vni %u path %pFX unlinked from es %s" , es_info -> vni ,
1586- & pi -> net -> p , es -> esi_str );
1586+ & pi -> net -> rn -> p , es -> esi_str );
15871587
15881588 if (es_info -> vni )
15891589 list_delete_node (es -> macip_evi_path_list ,
@@ -1641,7 +1641,7 @@ void bgp_evpn_path_es_link(struct bgp_path_info *pi, vni_t vni, esi_t *esi)
16411641 bgp_evpn_path_es_unlink (es_info );
16421642
16431643 if (BGP_DEBUG (evpn_mh , EVPN_MH_RT ))
1644- zlog_debug ("vni %u path %pFX linked to es %s" , vni , & pi -> net -> p ,
1644+ zlog_debug ("vni %u path %pFX linked to es %s" , vni , & pi -> net -> rn -> p ,
16451645 es -> esi_str );
16461646
16471647 /* link mac-ip path to the new destination ES */
@@ -1661,7 +1661,7 @@ static bool bgp_evpn_is_macip_path(struct bgp_path_info *pi)
16611661 * skipped) as these lists are maintained for managing
16621662 * host routes in the tenant VRF
16631663 */
1664- evp = (struct prefix_evpn * )& pi -> net -> p ;
1664+ evp = (struct prefix_evpn * )& pi -> net -> rn -> p ;
16651665 return is_evpn_prefix_ipaddr_v4 (evp ) || is_evpn_prefix_ipaddr_v6 (evp );
16661666}
16671667
@@ -1697,7 +1697,7 @@ bgp_evpn_es_path_update_on_es_vrf_chg(struct bgp_evpn_es_vrf *es_vrf,
16971697 if (BGP_DEBUG (evpn_mh , EVPN_MH_RT ))
16981698 zlog_debug (
16991699 "update path %pFX linked to es %s on vrf chg" ,
1700- & pi -> net -> p , es -> esi_str );
1700+ & pi -> net -> rn -> p , es -> esi_str );
17011701 bgp_evpn_route_entry_install_if_vrf_match (es_vrf -> bgp_vrf , pi ,
17021702 1 );
17031703 }
@@ -2086,7 +2086,7 @@ static void bgp_evpn_mac_update_on_es_oper_chg(struct bgp_evpn_es *es)
20862086 if (BGP_DEBUG (evpn_mh , EVPN_MH_RT ))
20872087 zlog_debug (
20882088 "update path %d %pFX linked to es %s on oper chg" ,
2089- es_info -> vni , & pi -> net -> p , es -> esi_str );
2089+ es_info -> vni , & pi -> net -> rn -> p , es -> esi_str );
20902090
20912091 bgp_evpn_update_type2_route_entry (bgp , vpn , pi -> net , pi ,
20922092 __func__ );
@@ -2135,7 +2135,7 @@ static void bgp_evpn_mac_update_on_es_local_chg(struct bgp_evpn_es *es,
21352135 if (BGP_DEBUG (evpn_mh , EVPN_MH_RT ))
21362136 zlog_debug (
21372137 "update path %pFX linked to es %s on chg to %s" ,
2138- & pi -> net -> p , es -> esi_str ,
2138+ & pi -> net -> rn -> p , es -> esi_str ,
21392139 is_local ? "local" : "non-local" );
21402140
21412141 attr_tmp = * pi -> attr ;
@@ -3160,7 +3160,7 @@ bool bgp_evpn_path_es_use_nhg(struct bgp *bgp_vrf, struct bgp_path_info *pi,
31603160 esi_t * esi ;
31613161 struct bgp_evpn_es_vrf * es_vrf = NULL ;
31623162 struct bgp_path_info * parent_pi ;
3163- struct bgp_node * rn ;
3163+ struct bgp_dest * bd ;
31643164 struct prefix_evpn * evp ;
31653165 struct bgp_path_info * mpinfo ;
31663166 bool use_l3nhg = false;
@@ -3176,11 +3176,11 @@ bool bgp_evpn_path_es_use_nhg(struct bgp *bgp_vrf, struct bgp_path_info *pi,
31763176 if (!parent_pi )
31773177 return false;
31783178
3179- rn = parent_pi -> net ;
3180- if (!rn )
3179+ bd = parent_pi -> net ;
3180+ if (!bd )
31813181 return false;
31823182
3183- evp = (struct prefix_evpn * )& rn -> p ;
3183+ evp = (struct prefix_evpn * )& bd -> rn -> p ;
31843184 if (evp -> prefix .route_type != BGP_EVPN_MAC_IP_ROUTE )
31853185 return false;
31863186
@@ -4706,7 +4706,7 @@ static void bgp_evpn_path_nh_unlink(struct bgp_path_evpn_nh_info *nh_info)
47064706 pi = nh_info -> pi ;
47074707 if (BGP_DEBUG (evpn_mh , EVPN_MH_RT ))
47084708 zlog_debug ("path %s unlinked from nh %s %s" ,
4709- pi -> net ? prefix2str (& pi -> net -> p , prefix_buf ,
4709+ pi -> net ? prefix2str (& pi -> net -> rn -> p , prefix_buf ,
47104710 sizeof (prefix_buf ))
47114711 : "" ,
47124712 nh -> bgp_vrf -> name_pretty , nh -> nh_str );
@@ -4741,7 +4741,7 @@ static void bgp_evpn_path_nh_link(struct bgp *bgp_vrf, struct bgp_path_info *pi)
47414741 if (!bgp_vrf -> evpn_nh_table ) {
47424742 if (BGP_DEBUG (evpn_mh , EVPN_MH_RT ))
47434743 zlog_debug ("path %pFX linked to vrf %s failed" ,
4744- & pi -> net -> p , bgp_vrf -> name_pretty );
4744+ & pi -> net -> rn -> p , bgp_vrf -> name_pretty );
47454745 return ;
47464746 }
47474747
@@ -4764,7 +4764,7 @@ static void bgp_evpn_path_nh_link(struct bgp *bgp_vrf, struct bgp_path_info *pi)
47644764
47654765 /* find-create nh */
47664766 memset (& ip , 0 , sizeof (ip ));
4767- if (pi -> net -> p .family == AF_INET6 ) {
4767+ if (pi -> net -> rn -> p .family == AF_INET6 ) {
47684768 SET_IPADDR_V6 (& ip );
47694769 memcpy (& ip .ipaddr_v6 , & pi -> attr -> mp_nexthop_global ,
47704770 sizeof (ip .ipaddr_v6 ));
@@ -4788,7 +4788,7 @@ static void bgp_evpn_path_nh_link(struct bgp *bgp_vrf, struct bgp_path_info *pi)
47884788 bgp_evpn_path_nh_unlink (nh_info );
47894789
47904790 if (BGP_DEBUG (evpn_mh , EVPN_MH_RT ))
4791- zlog_debug ("path %pFX linked to nh %s %s" , & pi -> net -> p ,
4791+ zlog_debug ("path %pFX linked to nh %s %s" , & pi -> net -> rn -> p ,
47924792 nh -> bgp_vrf -> name_pretty , nh -> nh_str );
47934793
47944794 /* link mac-ip path to the new nh */
@@ -4803,7 +4803,7 @@ static void bgp_evpn_path_nh_link(struct bgp *bgp_vrf, struct bgp_path_info *pi)
48034803 if (!nh -> ref_pi )
48044804 zlog_debug (
48054805 "path %pFX linked to nh %s %s with no valid pi" ,
4806- & pi -> net -> p , nh -> bgp_vrf -> name_pretty ,
4806+ & pi -> net -> rn -> p , nh -> bgp_vrf -> name_pretty ,
48074807 nh -> nh_str );
48084808 }
48094809}
@@ -4840,7 +4840,7 @@ static void bgp_evpn_nh_show_entry(struct bgp_evpn_nh *nh, struct vty *vty,
48404840
48414841 prefix_mac2str (& nh -> rmac , mac_buf , sizeof (mac_buf ));
48424842 if (nh -> ref_pi && nh -> ref_pi -> net )
4843- prefix2str (& nh -> ref_pi -> net -> p , prefix_buf , sizeof (prefix_buf ));
4843+ prefix2str (& nh -> ref_pi -> net -> rn -> p , prefix_buf , sizeof (prefix_buf ));
48444844 else
48454845 prefix_buf [0 ] = '\0' ;
48464846 if (json ) {
0 commit comments