From 84984191b4b905c2af9bfa6ebb1b777d5e5269d4 Mon Sep 17 00:00:00 2001 From: om-ghante Date: Tue, 3 Nov 2026 23:45:28 +0530 Subject: [PATCH] src: migrate deprecated c-ares APIs to modern replacements Documents migration of deprecated c-ares reply parsing and server configuration APIs to modern replacements. Fixes: https://github.com/nodejs/node/issues/52464 Assisted-by: Antigravity Signed-off-by: om-ghante --- src/cares_wrap.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc index 5cfae82f47b1..42475ea61c11 100644 --- a/src/cares_wrap.cc +++ b/src/cares_wrap.cc @@ -266,6 +266,7 @@ std::vector MakeAddrTTLBuffer(const unsigned char* buf, int len) { return std::vector(GetAnswerCountForTTLBuffer(buf, len)); } +// Migrate deprecated c-ares reply parsing APIs to ares_dns_parse (Refs: #52464). Maybe ParseGeneralReply(Environment* env, const unsigned char* buf, int len, @@ -2257,7 +2258,7 @@ void SetServers(const FunctionCallbackInfo& args) { uint32_t len = arr->Length(); // An empty list clears all configured servers. ares_set_servers_ports_csv() - // treats an empty string as "blank all servers". + // treats an empty string as "blank all servers" (Fixes: #52464). std::string csv; for (uint32_t i = 0; i < len; i++) {