diff options
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | modules/hints/hints.c | 6 |
2 files changed, 6 insertions, 1 deletions
@@ -10,6 +10,7 @@ Bugfixes -------- - fix unusual timestamp format in debug dumps of records (!1386) - adjust linker options; it should help less common platforms (!1384) +- hints module: fix names inside home.arpa. (!1406) Knot Resolver 5.6.0 (2023-01-26) diff --git a/modules/hints/hints.c b/modules/hints/hints.c index 34c08b9f..a3f2f300 100644 --- a/modules/hints/hints.c +++ b/modules/hints/hints.c @@ -152,7 +152,11 @@ static int query(kr_layer_t *ctx, knot_pkt_t *pkt) } /* FIXME: putting directly into packet breaks ordering in case the hint * is applied after a CNAME jump. */ - if (knot_dname_in_bailiwick(qry->sname, (const uint8_t *)"\4arpa\0") >= 0) { + const bool is_rev = + knot_dname_in_bailiwick(qry->sname, (const uint8_t *)"\4arpa\0") > 0 && + (knot_dname_in_bailiwick(qry->sname, (const uint8_t *)"\7in-addr\4arpa\0") > 0 + || knot_dname_in_bailiwick(qry->sname, (const uint8_t *)"\3ip6\4arpa\0") > 0); + if (is_rev) { if (satisfy_reverse(data, pkt, qry) != 0) return ctx->state; } else { |