@@ -2062,8 +2062,7 @@ static int update_evpn_route_entry(struct bgp *bgp, struct bgpevpn *vpn,
20622062 bgp_path_info_add (dest , tmp_pi );
20632063 } else {
20642064 tmp_pi = local_pi ;
2065- if (attrhash_cmp (tmp_pi -> attr , attr )
2066- && !CHECK_FLAG (tmp_pi -> flags , BGP_PATH_REMOVED ))
2065+ if (!CHECK_FLAG (tmp_pi -> flags , BGP_PATH_REMOVED ) && attrhash_cmp (tmp_pi -> attr , attr ))
20672066 route_change = 0 ;
20682067 else {
20692068 /*
@@ -3154,8 +3153,7 @@ static int install_evpn_route_entry_in_vrf(struct bgp *bgp_vrf,
31543153 pi = bgp_create_evpn_bgp_path_info (parent_pi , dest , & attr );
31553154 new_pi = true;
31563155 } else {
3157- if (attrhash_cmp (pi -> attr , & attr )
3158- && !CHECK_FLAG (pi -> flags , BGP_PATH_REMOVED )) {
3156+ if (!CHECK_FLAG (pi -> flags , BGP_PATH_REMOVED ) && attrhash_cmp (pi -> attr , & attr )) {
31593157 bgp_dest_unlock_node (dest );
31603158 return 0 ;
31613159 }
@@ -3278,8 +3276,8 @@ static int install_evpn_route_entry_in_vni_common(
32783276 * install_evpn_route_entry_in_vni_mac() or
32793277 * install_evpn_route_entry_in_vni_ip()
32803278 */
3281- if (attrhash_cmp (pi -> attr , parent_pi -> attr ) &&
3282- ! CHECK_FLAG (pi -> flags , BGP_PATH_REMOVED ))
3279+ if (! CHECK_FLAG (pi -> flags , BGP_PATH_REMOVED ) &&
3280+ attrhash_cmp (pi -> attr , parent_pi -> attr ))
32833281 return 0 ;
32843282 /* The attribute has changed. */
32853283 /* Add (or update) attribute to hash. */
0 commit comments