Skip to content

Commit 25d357b

Browse files
committed
fixup! deps: update c-ares to 1.24.0
1 parent ff93e1a commit 25d357b

File tree

10 files changed

+86
-18
lines changed

10 files changed

+86
-18
lines changed

deps/cares/cares.gyp

+28-14
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
'cares_sources_common': [
44
'include/ares.h',
55
'include/ares_dns.h',
6+
'include/ares_dns_record.h',
67
'include/ares_nameser.h',
78
'include/ares_rules.h',
89
'include/ares_version.h',
@@ -11,47 +12,59 @@
1112
'src/lib/ares__buf.c',
1213
'src/lib/ares__buf.h',
1314
'src/lib/ares__close_sockets.c',
15+
'src/lib/ares__hosts_file.c',
1416
'src/lib/ares__htable.c',
1517
'src/lib/ares__htable.h',
1618
'src/lib/ares__htable_asvp.c',
1719
'src/lib/ares__htable_asvp.h',
18-
'src/lib/ares__htable_stvp.c',
19-
'src/lib/ares__htable_stvp.h',
20+
'src/lib/ares__htable_strvp.c',
21+
'src/lib/ares__htable_strvp.h',
22+
'src/lib/ares__htable_szvp.c',
23+
'src/lib/ares__htable_szvp.h',
24+
'src/lib/ares__iface_ips.c',
25+
'src/lib/ares__iface_ips.h',
2026
'src/lib/ares__llist.c',
2127
'src/lib/ares__llist.h',
22-
'src/lib/ares__get_hostent.c',
2328
'src/lib/ares__parse_into_addrinfo.c',
2429
'src/lib/ares__read_line.c',
25-
'src/lib/ares__readaddrinfo.c',
2630
'src/lib/ares__slist.c',
2731
'src/lib/ares__slist.h',
32+
'src/lib/ares__socket.c',
2833
'src/lib/ares__sortaddrinfo.c',
34+
'src/lib/ares__threads.c',
2935
'src/lib/ares__timeval.c',
3036
'src/lib/ares_android.c',
37+
'src/lib/ares_android.h',
3138
'src/lib/ares_cancel.c',
3239
'src/lib/ares_create_query.c',
3340
'src/lib/ares_data.c',
3441
'src/lib/ares_data.h',
3542
'src/lib/ares_destroy.c',
43+
'src/lib/ares_dns_mapping.c',
44+
'src/lib/ares_dns_name.c',
45+
'src/lib/ares_dns_parse.c',
46+
'src/lib/ares_dns_record.c',
47+
'src/lib/ares_dns_private.h',
48+
'src/lib/ares_dns_write.c',
3649
'src/lib/ares_expand_name.c',
3750
'src/lib/ares_expand_string.c',
3851
'src/lib/ares_fds.c',
3952
'src/lib/ares_free_hostent.c',
4053
'src/lib/ares_free_string.c',
4154
'src/lib/ares_freeaddrinfo.c',
4255
'src/lib/ares_getaddrinfo.c',
56+
'src/lib/ares_getenv.c',
4357
'src/lib/ares_getenv.h',
4458
'src/lib/ares_gethostbyaddr.c',
4559
'src/lib/ares_gethostbyname.c',
4660
'src/lib/ares_getnameinfo.c',
4761
'src/lib/ares_getsock.c',
4862
'src/lib/ares_inet_net_pton.h',
4963
'src/lib/ares_init.c',
50-
'src/lib/ares_ipv6.h',
5164
'src/lib/ares_library_init.c',
65+
'src/lib/ares_ipv6.h',
66+
'src/lib/ares_math.c',
5267
'src/lib/ares_mkquery.c',
53-
'src/lib/ares_nowarn.c',
54-
'src/lib/ares_nowarn.h',
5568
'src/lib/ares_options.c',
5669
'src/lib/ares_parse_a_reply.c',
5770
'src/lib/ares_parse_aaaa_reply.c',
@@ -64,24 +77,28 @@
6477
'src/lib/ares_parse_srv_reply.c',
6578
'src/lib/ares_parse_txt_reply.c',
6679
'src/lib/ares_parse_uri_reply.c',
80+
'src/lib/ares_platform.c',
6781
'src/lib/ares_platform.h',
6882
'src/lib/ares_private.h',
6983
'src/lib/ares_process.c',
84+
'src/lib/ares_qcache.c',
7085
'src/lib/ares_query.c',
7186
'src/lib/ares_rand.c',
7287
'src/lib/ares_search.c',
7388
'src/lib/ares_send.c',
7489
'src/lib/ares_setup.h',
7590
'src/lib/ares_strcasecmp.c',
7691
'src/lib/ares_strcasecmp.h',
77-
'src/lib/ares_strdup.c',
78-
'src/lib/ares_strdup.h',
92+
'src/lib/ares_str.c',
93+
'src/lib/ares_str.h',
7994
'src/lib/ares_strerror.c',
8095
'src/lib/ares_strsplit.c',
96+
'src/lib/ares_strsplit.h',
97+
'src/lib/ares_sysconfig.c',
98+
'src/lib/ares_sysconfig_files.c',
8199
'src/lib/ares_timeout.c',
100+
'src/lib/ares_update_servers.c',
82101
'src/lib/ares_version.c',
83-
'src/lib/bitncmp.c',
84-
'src/lib/bitncmp.h',
85102
'src/lib/inet_net_pton.c',
86103
'src/lib/inet_ntop.c',
87104
'src/lib/setup_once.h',
@@ -91,9 +108,6 @@
91108
'cares_sources_win': [
92109
'src/lib/config-win32.h',
93110
'src/lib/windows_port.c',
94-
'src/lib/ares_getenv.c',
95-
'src/lib/ares_iphlpapi.h',
96-
'src/lib/ares_platform.c',
97111
],
98112
},
99113

deps/cares/config/aix/ares_config.h

+6
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@
124124
/* Define to 1 if you have the gethostname function. */
125125
#define HAVE_GETHOSTNAME 1
126126

127+
/* Define to 1 if you have the getifaddrs function. */
128+
#define HAVE_GETIFADDRS 1
129+
127130
/* Define to 1 if you have the getnameinfo function. */
128131
#define HAVE_GETNAMEINFO 1
129132

@@ -133,6 +136,9 @@
133136
/* Define to 1 if you have the `gettimeofday' function. */
134137
#define HAVE_GETTIMEOFDAY 1
135138

139+
/* Define to 1 if you have the <ifaddrs.h> header file. */
140+
#define HAVE_IFADDRS_H 1
141+
136142
/* Define to 1 if you have the `if_indextoname' function. */
137143
#define HAVE_IF_INDEXTONAME 1
138144

deps/cares/config/android/ares_config.h

+6
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@
124124
/* Define to 1 if you have the gethostname function. */
125125
#define HAVE_GETHOSTNAME 1
126126

127+
/* Define to 1 if you have the getifaddrs function. */
128+
#define HAVE_GETIFADDRS 1
129+
127130
/* Define to 1 if you have the getnameinfo function. */
128131
#define HAVE_GETNAMEINFO 1
129132

@@ -133,6 +136,9 @@
133136
/* Define to 1 if you have the `gettimeofday' function. */
134137
#define HAVE_GETTIMEOFDAY 1
135138

139+
/* Define to 1 if you have the <ifaddrs.h> header file. */
140+
#define HAVE_IFADDRS_H 1
141+
136142
/* Define to 1 if you have the `if_indextoname' function. */
137143
#define HAVE_IF_INDEXTONAME 1
138144

deps/cares/config/darwin/ares_config.h

+6
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@
124124
/* Define to 1 if you have the gethostname function. */
125125
#define HAVE_GETHOSTNAME 1
126126

127+
/* Define to 1 if you have the getifaddrs function. */
128+
#define HAVE_GETIFADDRS 1
129+
127130
/* Define to 1 if you have the getnameinfo function. */
128131
#define HAVE_GETNAMEINFO 1
129132

@@ -133,6 +136,9 @@
133136
/* Define to 1 if you have the `gettimeofday' function. */
134137
#define HAVE_GETTIMEOFDAY 1
135138

139+
/* Define to 1 if you have the <ifaddrs.h> header file. */
140+
#define HAVE_IFADDRS_H 1
141+
136142
/* Define to 1 if you have the `if_indextoname' function. */
137143
#define HAVE_IF_INDEXTONAME 1
138144

deps/cares/config/freebsd/ares_config.h

+6
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@
124124
/* Define to 1 if you have the gethostname function. */
125125
#define HAVE_GETHOSTNAME 1
126126

127+
/* Define to 1 if you have the getifaddrs function. */
128+
#define HAVE_GETIFADDRS 1
129+
127130
/* Define to 1 if you have the getnameinfo function. */
128131
#define HAVE_GETNAMEINFO 1
129132

@@ -133,6 +136,9 @@
133136
/* Define to 1 if you have the `gettimeofday' function. */
134137
#define HAVE_GETTIMEOFDAY 1
135138

139+
/* Define to 1 if you have the <ifaddrs.h> header file. */
140+
#define HAVE_IFADDRS_H 1
141+
136142
/* Define to 1 if you have the `if_indextoname' function. */
137143
#define HAVE_IF_INDEXTONAME 1
138144

deps/cares/config/linux/ares_config.h

+6
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@
124124
/* Define to 1 if you have the gethostname function. */
125125
#define HAVE_GETHOSTNAME 1
126126

127+
/* Define to 1 if you have the getifaddrs function. */
128+
#define HAVE_GETIFADDRS 1
129+
127130
/* Define to 1 if you have the getnameinfo function. */
128131
#define HAVE_GETNAMEINFO 1
129132

@@ -133,6 +136,9 @@
133136
/* Define to 1 if you have the `gettimeofday' function. */
134137
#define HAVE_GETTIMEOFDAY 1
135138

139+
/* Define to 1 if you have the <ifaddrs.h> header file. */
140+
#define HAVE_IFADDRS_H 1
141+
136142
/* Define to 1 if you have the `if_indextoname' function. */
137143
#define HAVE_IF_INDEXTONAME 1
138144

deps/cares/config/netbsd/ares_config.h

+6
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@
124124
/* Define to 1 if you have the gethostname function. */
125125
#define HAVE_GETHOSTNAME 1
126126

127+
/* Define to 1 if you have the getifaddrs function. */
128+
#define HAVE_GETIFADDRS 1
129+
127130
/* Define to 1 if you have the getnameinfo function. */
128131
#define HAVE_GETNAMEINFO 1
129132

@@ -133,6 +136,9 @@
133136
/* Define to 1 if you have the `gettimeofday' function. */
134137
#define HAVE_GETTIMEOFDAY 1
135138

139+
/* Define to 1 if you have the <ifaddrs.h> header file. */
140+
#define HAVE_IFADDRS_H 1
141+
136142
/* Define to 1 if you have the `if_indextoname' function. */
137143
#define HAVE_IF_INDEXTONAME 1
138144

deps/cares/config/openbsd/ares_config.h

+6
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@
124124
/* Define to 1 if you have the gethostname function. */
125125
#define HAVE_GETHOSTNAME 1
126126

127+
/* Define to 1 if you have the getifaddrs function. */
128+
#define HAVE_GETIFADDRS 1
129+
127130
/* Define to 1 if you have the getnameinfo function. */
128131
#define HAVE_GETNAMEINFO 1
129132

@@ -133,6 +136,9 @@
133136
/* Define to 1 if you have the `gettimeofday' function. */
134137
#define HAVE_GETTIMEOFDAY 1
135138

139+
/* Define to 1 if you have the <ifaddrs.h> header file. */
140+
#define HAVE_IFADDRS_H 1
141+
136142
/* Define to 1 if you have the `if_indextoname' function. */
137143
#define HAVE_IF_INDEXTONAME 1
138144

deps/cares/config/sunos/ares_config.h

+6
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@
124124
/* Define to 1 if you have the gethostname function. */
125125
#define HAVE_GETHOSTNAME 1
126126

127+
/* Define to 1 if you have the getifaddrs function. */
128+
#define HAVE_GETIFADDRS 1
129+
127130
/* Define to 1 if you have the getnameinfo function. */
128131
#define HAVE_GETNAMEINFO 1
129132

@@ -133,6 +136,9 @@
133136
/* Define to 1 if you have the `gettimeofday' function. */
134137
#define HAVE_GETTIMEOFDAY 1
135138

139+
/* Define to 1 if you have the <ifaddrs.h> header file. */
140+
#define HAVE_IFADDRS_H 1
141+
136142
/* Define to 1 if you have the `if_indextoname' function. */
137143
#define HAVE_IF_INDEXTONAME 1
138144

test/parallel/test-dns-resolveany-bad-ancount.js

+10-4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ const dgram = require('dgram');
77
const dnsPromises = dns.promises;
88

99
const server = dgram.createSocket('udp4');
10+
const resolver = new dns.Resolver({ timeout: 100, tries: 1 });
11+
const resolverPromises = new dnsPromises.Resolver({ timeout: 100, tries: 1 });
1012

1113
server.on('message', common.mustCall((msg, { address, port }) => {
1214
const parsed = dnstools.parseDNSPacket(msg);
@@ -18,16 +20,20 @@ server.on('message', common.mustCall((msg, { address, port }) => {
1820
questions: parsed.questions,
1921
answers: { type: 'A', address: '1.2.3.4', ttl: 123, domain },
2022
});
21-
// Overwrite the # of answers with 2, which is incorrect.
23+
// Overwrite the # of answers with 2, which is incorrect. The response is
24+
// discarded in c-ares >= 1.21.0. This is the reason why a small timeout is
25+
// used in the `Resolver` constructor. See
26+
// https://github.com/nodejs/node/pull/50743#issue-1994909204
2227
buf.writeUInt16LE(2, 6);
2328
server.send(buf, port, address);
2429
}, 2));
2530

2631
server.bind(0, common.mustCall(async () => {
2732
const address = server.address();
28-
dns.setServers([`127.0.0.1:${address.port}`]);
33+
resolver.setServers([`127.0.0.1:${address.port}`]);
34+
resolverPromises.setServers([`127.0.0.1:${address.port}`]);
2935

30-
dnsPromises.resolveAny('example.org')
36+
resolverPromises.resolveAny('example.org')
3137
.then(common.mustNotCall())
3238
.catch(common.expectsError({
3339
// May return EBADRESP or ETIMEOUT
@@ -36,7 +42,7 @@ server.bind(0, common.mustCall(async () => {
3642
hostname: 'example.org'
3743
}));
3844

39-
dns.resolveAny('example.org', common.mustCall((err) => {
45+
resolver.resolveAny('example.org', common.mustCall((err) => {
4046
assert.notStrictEqual(err.code, 'SUCCESS');
4147
assert.strictEqual(err.syscall, 'queryAny');
4248
assert.strictEqual(err.hostname, 'example.org');

0 commit comments

Comments
 (0)