[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>
Wed, 20 Dec 2023 17:07:36 +0000 (18:07 +0100)
commit0d2a778cbf5ee80b3b465a2522dbcbf4583c4c72
tree53a839d21e443fa660295c894d063f41a76bf960
parentb171f447c5c243ba5c205ea0ce0e9d659792d6c8
[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