diff --git a/zebra/zebra_rnh.c b/zebra/zebra_rnh.c index 5f397eb8c2..6f65f8ab7a 100644 --- a/zebra/zebra_rnh.c +++ b/zebra/zebra_rnh.c @@ -759,7 +759,7 @@ static void zebra_rnh_eval_nexthop_entry(struct zebra_vrf *zvrf, afi_t afi, * change. */ zebra_rnh_remove_from_routing_table(rnh); - if (!prefix_same(&rnh->resolved_route, prn ? NULL : &prn->p)) { + if (!prefix_same(&rnh->resolved_route, prn ? &prn->p : NULL)) { if (prn) prefix_copy(&rnh->resolved_route, &prn->p); else { @@ -965,7 +965,6 @@ static void copy_state(struct rnh *rnh, struct route_entry *re, static int compare_state(struct route_entry *r1, struct route_entry *r2) { - if (!r1 && !r2) return 0; @@ -981,8 +980,7 @@ static int compare_state(struct route_entry *r1, struct route_entry *r2) if (r1->nexthop_num != r2->nexthop_num) return 1; - if (CHECK_FLAG(r1->status, ROUTE_ENTRY_NEXTHOPS_CHANGED) - || CHECK_FLAG(r1->status, ROUTE_ENTRY_LABELS_CHANGED)) + if (nexthop_group_hash(&r1->ng) != nexthop_group_hash(&r2->ng)) return 1; return 0;