Commit 196ebd4f authored by Marek Vavruša's avatar Marek Vavruša Committed by Petr Špaček

nsrep: allow inclusion of good nameservers if there's space in selection

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.
parent 768ecc0d
......@@ -262,7 +262,7 @@ static int eval_nsrep(const knot_dname_t *owner, const pack_t *addr_set, struct
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment