The current algorithm doesn't work if there's 3 unknown nameservers in the
address selection set, and the 4th is known working with higher score
than unknown.
update_nsrep_set(ns, owner, addr_choice, score);
ns->reputation = reputation;
return 1; /* Stop evaluation */
- } else if (ns->score > KR_NS_MAX_SCORE) {
+ } else if (ns->score > KR_NS_MAX_SCORE || addr_choice[KR_NSREP_MAXADDR - 1] == NULL) {
/* Check if any server was already selected.
* If no, pick current server and continue evaluation. */
update_nsrep_set(ns, owner, addr_choice, score);