Commit 6cca326f authored by Vladimír Čunát's avatar Vladimír Čunát
Browse files

Merge !278: lib/nsrep: revert some changes from commit 5581cf9b

Closes #179 and #178.
parents b5140786 dcc75a1e
Pipeline #3361 canceled with stages
in 59 minutes and 33 seconds
......@@ -139,16 +139,16 @@ static int eval_nsrep(const char *k, void *v, void *baton)
/* If the server doesn't have IPv6, give it disadvantage. */
if (reputation & KR_NS_NOIP6) {
score += FAVOUR_IPV6;
/* If the server is unknown but has rep record, treat it as timeouted */
if (reputation & KR_NS_NOIP4) {
/* Server is unknown but has rep record.
* We can not distinguish if it happens either
* due to timeout or due to other circumstances
* (for example, we have ipv6-only network and
* we are dealing with ipv4-only NS).
* Don't use it for now.
* TODO -
* add explicit flag for timeouted servers */
score = KR_NS_MAX_SCORE + 1;
score = KR_NS_UNKNOWN;
/* Try to start with clean slate */
if (!(ctx->options & QUERY_NO_IPV6)) {
reputation &= ~KR_NS_NOIP6;
}
if (!(ctx->options & QUERY_NO_IPV4)) {
reputation &= ~KR_NS_NOIP4;
}
}
}
} else {
......
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