@@ -527,7 +527,7 @@ int delete_global_ead_evi_routes(struct bgp *bgp, struct bgpevpn *vpn)
527
527
{
528
528
afi_t afi ;
529
529
safi_t safi ;
530
- struct bgp_dest * rdrn , * rn ;
530
+ struct bgp_dest * rdrn , * bd ;
531
531
struct bgp_table * table ;
532
532
struct bgp_path_info * pi ;
533
533
@@ -543,15 +543,15 @@ int delete_global_ead_evi_routes(struct bgp *bgp, struct bgpevpn *vpn)
543
543
* Iterate over all the routes in this table and delete EAD/EVI
544
544
* routes
545
545
*/
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 ;
548
548
549
549
if (evp -> prefix .route_type != BGP_EVPN_AD_ROUTE )
550
550
continue ;
551
551
552
- delete_evpn_route_entry (bgp , afi , safi , rn , & pi );
552
+ delete_evpn_route_entry (bgp , afi , safi , bd , & pi );
553
553
if (pi )
554
- bgp_process (bgp , rn , afi , safi );
554
+ bgp_process (bgp , bd , afi , safi );
555
555
}
556
556
}
557
557
@@ -1583,7 +1583,7 @@ static void bgp_evpn_path_es_unlink(struct bgp_path_es_info *es_info)
1583
1583
pi = es_info -> pi ;
1584
1584
if (BGP_DEBUG (evpn_mh , EVPN_MH_RT ))
1585
1585
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 );
1587
1587
1588
1588
if (es_info -> vni )
1589
1589
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)
1641
1641
bgp_evpn_path_es_unlink (es_info );
1642
1642
1643
1643
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 ,
1645
1645
es -> esi_str );
1646
1646
1647
1647
/* 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)
1661
1661
* skipped) as these lists are maintained for managing
1662
1662
* host routes in the tenant VRF
1663
1663
*/
1664
- evp = (struct prefix_evpn * )& pi -> net -> p ;
1664
+ evp = (struct prefix_evpn * )& pi -> net -> rn -> p ;
1665
1665
return is_evpn_prefix_ipaddr_v4 (evp ) || is_evpn_prefix_ipaddr_v6 (evp );
1666
1666
}
1667
1667
@@ -1697,7 +1697,7 @@ bgp_evpn_es_path_update_on_es_vrf_chg(struct bgp_evpn_es_vrf *es_vrf,
1697
1697
if (BGP_DEBUG (evpn_mh , EVPN_MH_RT ))
1698
1698
zlog_debug (
1699
1699
"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 );
1701
1701
bgp_evpn_route_entry_install_if_vrf_match (es_vrf -> bgp_vrf , pi ,
1702
1702
1 );
1703
1703
}
@@ -2086,7 +2086,7 @@ static void bgp_evpn_mac_update_on_es_oper_chg(struct bgp_evpn_es *es)
2086
2086
if (BGP_DEBUG (evpn_mh , EVPN_MH_RT ))
2087
2087
zlog_debug (
2088
2088
"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 );
2090
2090
2091
2091
bgp_evpn_update_type2_route_entry (bgp , vpn , pi -> net , pi ,
2092
2092
__func__ );
@@ -2135,7 +2135,7 @@ static void bgp_evpn_mac_update_on_es_local_chg(struct bgp_evpn_es *es,
2135
2135
if (BGP_DEBUG (evpn_mh , EVPN_MH_RT ))
2136
2136
zlog_debug (
2137
2137
"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 ,
2139
2139
is_local ? "local" : "non-local" );
2140
2140
2141
2141
attr_tmp = * pi -> attr ;
@@ -3160,7 +3160,7 @@ bool bgp_evpn_path_es_use_nhg(struct bgp *bgp_vrf, struct bgp_path_info *pi,
3160
3160
esi_t * esi ;
3161
3161
struct bgp_evpn_es_vrf * es_vrf = NULL ;
3162
3162
struct bgp_path_info * parent_pi ;
3163
- struct bgp_node * rn ;
3163
+ struct bgp_dest * bd ;
3164
3164
struct prefix_evpn * evp ;
3165
3165
struct bgp_path_info * mpinfo ;
3166
3166
bool use_l3nhg = false;
@@ -3176,11 +3176,11 @@ bool bgp_evpn_path_es_use_nhg(struct bgp *bgp_vrf, struct bgp_path_info *pi,
3176
3176
if (!parent_pi )
3177
3177
return false;
3178
3178
3179
- rn = parent_pi -> net ;
3180
- if (!rn )
3179
+ bd = parent_pi -> net ;
3180
+ if (!bd )
3181
3181
return false;
3182
3182
3183
- evp = (struct prefix_evpn * )& rn -> p ;
3183
+ evp = (struct prefix_evpn * )& bd -> rn -> p ;
3184
3184
if (evp -> prefix .route_type != BGP_EVPN_MAC_IP_ROUTE )
3185
3185
return false;
3186
3186
@@ -4706,7 +4706,7 @@ static void bgp_evpn_path_nh_unlink(struct bgp_path_evpn_nh_info *nh_info)
4706
4706
pi = nh_info -> pi ;
4707
4707
if (BGP_DEBUG (evpn_mh , EVPN_MH_RT ))
4708
4708
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 ,
4710
4710
sizeof (prefix_buf ))
4711
4711
: "" ,
4712
4712
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)
4741
4741
if (!bgp_vrf -> evpn_nh_table ) {
4742
4742
if (BGP_DEBUG (evpn_mh , EVPN_MH_RT ))
4743
4743
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 );
4745
4745
return ;
4746
4746
}
4747
4747
@@ -4764,7 +4764,7 @@ static void bgp_evpn_path_nh_link(struct bgp *bgp_vrf, struct bgp_path_info *pi)
4764
4764
4765
4765
/* find-create nh */
4766
4766
memset (& ip , 0 , sizeof (ip ));
4767
- if (pi -> net -> p .family == AF_INET6 ) {
4767
+ if (pi -> net -> rn -> p .family == AF_INET6 ) {
4768
4768
SET_IPADDR_V6 (& ip );
4769
4769
memcpy (& ip .ipaddr_v6 , & pi -> attr -> mp_nexthop_global ,
4770
4770
sizeof (ip .ipaddr_v6 ));
@@ -4788,7 +4788,7 @@ static void bgp_evpn_path_nh_link(struct bgp *bgp_vrf, struct bgp_path_info *pi)
4788
4788
bgp_evpn_path_nh_unlink (nh_info );
4789
4789
4790
4790
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 ,
4792
4792
nh -> bgp_vrf -> name_pretty , nh -> nh_str );
4793
4793
4794
4794
/* 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)
4803
4803
if (!nh -> ref_pi )
4804
4804
zlog_debug (
4805
4805
"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 ,
4807
4807
nh -> nh_str );
4808
4808
}
4809
4809
}
@@ -4840,7 +4840,7 @@ static void bgp_evpn_nh_show_entry(struct bgp_evpn_nh *nh, struct vty *vty,
4840
4840
4841
4841
prefix_mac2str (& nh -> rmac , mac_buf , sizeof (mac_buf ));
4842
4842
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 ));
4844
4844
else
4845
4845
prefix_buf [0 ] = '\0' ;
4846
4846
if (json ) {
0 commit comments