]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
nsrep: give advantage to IPv6 also for FORWARD-like
authorVladimír Čunát <vladimir.cunat@nic.cz>
Wed, 21 Mar 2018 11:01:42 +0000 (12:01 +0100)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Wed, 21 Nov 2018 13:26:58 +0000 (14:26 +0100)
NEWS
lib/nsrep.c

diff --git a/NEWS b/NEWS
index 360cc99b9b9385a2758538cea4e0d03ccb6f5c3b..d3b7e3ef246a6b0685636a1c1aa7449a9d3039f2 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -21,6 +21,8 @@ Bugfixes
 Improvements
 ------------
 - Dockerfile: rework, basing on Debian instead of Alpine
+- policy.{FORWARD,TLS_FORWARD,STUB}: give advantage to IPv6
+  when choosing whom to ask, just as for iteration
 
 
 Knot Resolver 3.1.0 (2018-11-02)
index ea4b11fc2616e93acfd0b2c300f41b7cffd1c772..f5ef21ce3a19c699b091a345287250065262372d 100644 (file)
@@ -509,6 +509,9 @@ int kr_nsrep_sort(struct kr_nsrep *ns, kr_nsrep_rtt_lru_t *rtt_cache)
                        scores[i] = 1;
                } else {
                        scores[i] = rtt_cache_entry->score;
+                       if (sa->sa_family == AF_INET) {
+                               scores[i] += FAVOUR_IPV6;
+                       }
                }
                if (VERBOSE_STATUS) {
                        char sa_str[INET6_ADDRSTRLEN];