[PATCH] test: fix dns test case failures after c-ares update to 1.21.0+
authorBrad House <brad@brad-house.com>
Wed, 15 Nov 2023 14:33:47 +0000 (09:33 -0500)
committerJérémy Lal <kapouer@melix.org>
Sun, 3 Dec 2023 21:41:14 +0000 (22:41 +0100)
commit3d3ad1900d7648ad2a62ede28270cc5063729a93
treebc1506d7ba4160f9b59972ced2dde33eaf342c57
parent5cfa53d312176a411a283f53202fc1e67ebb1909
[PATCH] test: fix dns test case failures after c-ares update to 1.21.0+

c-ares has made intentional changes to the behavior of TXT records
to comply with RFC 7208, which concatenates multiple strings for
the same TXT record into a single string.  Multiple TXT records
are not concatenated.

Also, response handling has changed, such that a response which is
completely invalid in formatting is thrown away as a malicious
forged/spoofed packet rather than returning EBADRESP.  This is one
step toward RFC 9018 (EDNS COOKIES) which will require the message
to at least be structurally valid to validate against spoofed
records.

Fix By: Brad House (@bradh352)

PR-URL: https://github.com/nodejs/node/pull/50743
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Fixes: https://github.com/nodejs/node/issues/50741
Refs: https://github.com/nodejs/node/issues/50444

Gbp-Pq: Topic build
Gbp-Pq: Name test_dns_resolveany_bad_ancount.patch
test/parallel/test-dns-resolveany-bad-ancount.js
test/parallel/test-dns-resolveany.js