[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)
committerAdrian Bunk <bunk@debian.org>
Sat, 22 Jun 2024 12:21:29 +0000 (15:21 +0300)
commit2560013fa70c54b5dfc5065e4495e606f0c13735
tree0094cb98083bc8635b44b3893cd9ac738087a5c4
parent40224ae4b57320f99c861cd66629f8c4c24c9724
[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