This filtering was dropped in
4565cc596680 (v5.3.0).
Now it's reintroduced - but inside the function, as that seems nicer.
Nit: naming and comment were updated to fit the current usage.
As the code is designed so far (in whole history probably), in order
to detect whether we need to choose a zone cut closer to the root,
we need to do something like this in lib/zonecut.c already,
instead of just during server selection.
I don't think this change can break anything.
Fetching unusable addresses from cache seems pointless,
as selection wouldn't be allowed to use them or try resolving them.
+Knot Resolver 5.x.y (202y-mm-dd)
+================================
+
+Bugfixes
+--------
+- fix potential SERVFAIL deadlocks if net.ipv6 = false (#880)
+
+
Knot Resolver 5.7.0 (2023-08-22)
================================
/** Information for one NS name + address type. */
typedef enum {
AI_UNINITED = 0,
- AI_REPUT, /**< Don't use this addrset, due to: cache_rep, NO_IPV6, ...
- * cache_rep approximates various problems when fetching the RRset. */
+ AI_DISABLED, /**< Can't use this addrset. */
AI_CYCLED, /**< Skipped due to cycle detection; see implementation for details. */
AI_LAST_BAD = AI_CYCLED, /** bad states: <= AI_LAST_BAD */
AI_UNKNOWN, /**< Don't know status of this RRset; various reasons. */
int rdlen;
switch (rrtype) {
case KNOT_RRTYPE_A:
+ if (qry->flags.NO_IPV4)
+ return AI_DISABLED;
rdlen = 4;
break;
case KNOT_RRTYPE_AAAA:
+ if (qry->flags.NO_IPV6 || no6_is_bad())
+ return AI_DISABLED;
rdlen = 16;
break;
default: