fix: on rp election, some variables are not reset
@@ -835,9 +835,13 @@ rp_grp_entry_t *rp_grp_match(uint32_t group)
if (curr_group_mask > mask_ptr->group_mask)
continue;
- /* reset best priority while mask get longer */
+ /* reset best priority/address/hash value while mask get longer */
if (curr_group_mask < mask_ptr->group_mask)
+ {
best_priority = ~0;
+ best_address_h = 0;
+ best_hash_value = 0;
+ }
curr_hash_mask_h = ntohl(mask_ptr->hash_mask);
for (entry_ptr = mask_ptr->grp_rp_next; entry_ptr; entry_ptr = entry_ptr->grp_rp_next) {
