@@ -1438,7 +1438,7 @@ static void zebra_rib_evaluate_mpls(struct route_node *rn)
1438
1438
*/
1439
1439
static bool rib_route_match_ctx (const struct route_entry * re ,
1440
1440
const struct zebra_dplane_ctx * ctx ,
1441
- bool is_update )
1441
+ bool is_update , bool async )
1442
1442
{
1443
1443
bool result = false;
1444
1444
@@ -1454,13 +1454,12 @@ static bool rib_route_match_ctx(const struct route_entry *re,
1454
1454
/* We use an extra test for statics, and another for
1455
1455
* kernel routes.
1456
1456
*/
1457
- if (re -> type == ZEBRA_ROUTE_STATIC &&
1457
+ if (re -> type == ZEBRA_ROUTE_STATIC && ! async &&
1458
1458
(re -> distance != dplane_ctx_get_old_distance (ctx ) ||
1459
1459
re -> tag != dplane_ctx_get_old_tag (ctx ))) {
1460
1460
result = false;
1461
1461
} else if (re -> type == ZEBRA_ROUTE_KERNEL &&
1462
- re -> metric !=
1463
- dplane_ctx_get_old_metric (ctx )) {
1462
+ re -> metric != dplane_ctx_get_old_metric (ctx )) {
1464
1463
result = false;
1465
1464
}
1466
1465
}
@@ -1482,7 +1481,7 @@ static bool rib_route_match_ctx(const struct route_entry *re,
1482
1481
/* We use an extra test for statics, and another for
1483
1482
* kernel routes.
1484
1483
*/
1485
- if (re -> type == ZEBRA_ROUTE_STATIC &&
1484
+ if (re -> type == ZEBRA_ROUTE_STATIC && ! async &&
1486
1485
(re -> distance != dplane_ctx_get_distance (ctx ) ||
1487
1486
re -> tag != dplane_ctx_get_tag (ctx ))) {
1488
1487
result = false;
@@ -1946,13 +1945,13 @@ static void rib_process_result(struct zebra_dplane_ctx *ctx)
1946
1945
RNODE_FOREACH_RE (rn , rib ) {
1947
1946
1948
1947
if (re == NULL ) {
1949
- if (rib_route_match_ctx (rib , ctx , false))
1948
+ if (rib_route_match_ctx (rib , ctx , false, false ))
1950
1949
re = rib ;
1951
1950
}
1952
1951
1953
1952
/* Check for old route match */
1954
1953
if (is_update && (old_re == NULL )) {
1955
- if (rib_route_match_ctx (rib , ctx , true /*is_update*/ ))
1954
+ if (rib_route_match_ctx (rib , ctx , true, false ))
1956
1955
old_re = rib ;
1957
1956
}
1958
1957
@@ -2271,7 +2270,7 @@ static void rib_process_dplane_notify(struct zebra_dplane_ctx *ctx)
2271
2270
* info.
2272
2271
*/
2273
2272
RNODE_FOREACH_RE (rn , re ) {
2274
- if (rib_route_match_ctx (re , ctx , false /*!update*/ ))
2273
+ if (rib_route_match_ctx (re , ctx , false, true ))
2275
2274
break ;
2276
2275
}
2277
2276
0 commit comments