1
0
mirror of https://frontier.innolan.net/rainlance/c-ares.git synced 2025-11-22 10:13:15 +00:00
Commit Graph

1684 Commits

Author SHA1 Message Date
5e5b2f4239 Fix typos detected by lintian
Closes #32
2016-01-23 23:42:13 +01:00
a37863498f Distribute all man pages 2016-01-23 23:42:10 +01:00
e4e40161f8 README.cares: s/I/Daniel
... and add a pointer to an existing version of the original area 1.1.1
package.a
2016-01-18 13:58:31 +01:00
ab78ef369d read_tcp_data: don't try to use NULL pointer after malloc failure
CID 56884, pointed out by Coverity. We really should make this function
return an error code so that a malloc() failure can return back a major
failure.
2016-01-18 13:12:38 +01:00
51dae48ecf configure_socket: explicitly ignore return code
CID 56889 in Coverity pointed out the return code from setsocknonblock()
is ignored, and this added typecast to (void) makes it explicit.
2016-01-18 13:08:17 +01:00
48c0f703f6 ahost: check the select() return code
Fixes CID 137189, pointed out by Coverity
2016-01-18 13:04:48 +01:00
250e7a20cc Fix buildconf on platforms using glibtoolize
Commit c49a87eea5 changed buildconf to only check for
libtoolize, but missed a line
2016-01-18 11:03:15 +00:00
66f40230a0 Don't exit loop early leaving uninitialized entries
Update for commit affc63cba8.

The original patch from Gregor Jasny did not have the break
statement; I incorrectly added it to prevent continuing the loop.
However, the later entries in the array would then be left
uninitialized, causing problems for later cleanup.

So fix to match Gregor's original patch, with apologies.
2016-01-18 10:00:59 +00:00
c49a87eea5 buildconf: remove check for libtool, it only requires libtoolize 2016-01-18 00:03:06 +01:00
affc63cba8 Use libresolv to initialize cares on iPhone targets
On iPhone targets like iOS, watchOS or tvOS the file
/etc/resolv.conf cannot be used to configure cares.

Instead the resolver library is queried for configuration
values.

CC: Yury Kirpichev <ykirpichev@yandex-team.ru>
2016-01-17 16:45:04 +00:00
f945a0cfe3 README: updated to new repo URL 2016-01-17 16:31:35 +01:00
52ecef76df Fixing slow DNS lookup issue
This patch is fixing the dns lookup issue due to dummy dns information
of a disconnected adapter(in my case is a bluetooth adapter). I changed
the dns lookup policy to try GetNetworkParams first because the
GetNetworkParams provides the most reliable dns information (lots of
checks were done by system). I also filter out inoperable adapter in
DNS_AdaptersAddresses in case GetNetworkParams fail.
2016-01-14 11:32:18 +00:00
fe34a70d6a Merge pull request #30 from p-push/vs-2015
Support Visual Studio 2015
2016-01-04 07:22:59 +00:00
36ca36eedd Support Visual Studio 2015 2016-01-03 15:41:57 -05:00
cbb466e813 added another version case to Makefile.msvc
nmake version 11.00.61030.0 resolves to CC_VERS_NUM = 110
2015-11-11 09:56:06 +00:00
ce3a0ee056 Merge pull request #26 from bitbouncer/vs-2013
added define for visual studio 2013
2015-09-16 10:51:30 +01:00
cac35ac5d8 added define for visual studio 2013 2015-06-25 10:32:03 +02:00
bba4dc573f ares__read_line: free buf on realloc failure 2014-11-06 10:21:54 +01:00
453578354f Destroy options if ares_save_options fails
It's possible that, if ares_save_options failed, the opts structure
would contain some allocated memory. Calling ares_destroy_options in
this case is safe, because ares_save_options zeroes out the memory
initially.
2014-11-06 10:21:54 +01:00
a0b24beb95 Continue loop if space for hostname not large enough
When attempting to build a search domain from the local hostname
(used as a fallback when no other methods have given a search
domain), the code doubles the buffer size on each loop iteration.

However, the loop previously had a WHILE_FALSE terminator so the continue
statement exited the loop rather than going round again.
2014-11-06 10:14:08 +01:00
3d3ab03c6d ares_getnameinfo.3: there is no ares_getaddrinfo 2014-10-30 11:05:34 +01:00
9456c39934 Prevent tmpbuf from overrunning
Fix Coverity error CID 56886.

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2014-09-30 16:49:56 +01:00
296ced3a0d Re-start loop if select fails
Fix Coverity error CID 56882

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2014-09-30 16:49:55 +01:00
bd2c61353f Free temporary variable in error path
Fix Coverity CID 56890

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2014-09-30 16:49:51 +01:00
7db1afd38f Fix integer shift overflow if both tcp_socket and udp_socket are set
The problem occurs if at the start of the loop the sockindex is at the
last valid ARES_GETSOCK_MAXNUM position. If then both udp_socket and
tcp_socket are valid, sockindex gets incremented for UDP first and
points one entry behind the array for the tcp block.
So the fix is to check after every increment of sockindex if it is still
valid.

Fix Coverity error CID 56878

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2014-09-30 16:49:49 +01:00
13dc4800b2 Null check before dereference
Fix Coverity error CID 56880

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2014-09-30 16:49:46 +01:00
880ec44da9 Comment in ares_ipv6.h 2014-07-28 20:27:51 +02:00
ede0f84b8e CONTRIBUTING: add file to indicate mailing list is preferred 2014-07-25 09:28:46 +01:00
2bc07b2e74 Add -t u option to ahost
Add an option to allow specification of the AF_UNSPEC
address family.
2014-07-24 16:39:13 +01:00
c1fe47f6d9 host_callback: Fall back to AF_INET on searching with AF_UNSPEC
Previously, when an ares_gethostbyname() searched with AF_UNSPEC and the
first AF_INET6 call only returned CNAMEs, the host_callback never
retried AF_INET.

This patch makes sure than on ARES_SUCCESS, the result of AF_INET6 is
taken as authoritative only if the result contains some addresses.
2014-07-24 16:12:39 +02:00
943e79f4bf Move memset call below platform-specific declarations
A GitHub commenter [1] says that my recent change to ahost.c has
problems compiling on Windows + C89 platforms.

[1]  https://github.com/bagder/c-ares/commit/ee22246507c9#commitcomment-6587616
2014-07-23 18:03:45 +02:00
7aabbefab1 Update ahost man page to describe -s option.
Commit ee22246507 added the -s <domain> option to the
ahost command, but neglected to update the man page to
describe it.

Also fix typo in description of -t option.
2014-07-01 10:47:56 +02:00
09e64d7124 ares_parse_soa_reply: Do not leak rr_name on allocation failure
If ares_malloc_data failed, already allocated rr_name would go out of
scope.
2014-05-22 16:35:58 +02:00
7df69c0f79 Don't override explicitly specified search domains
Only set search domains from /etc/resolv.conf if there isn't a value
already present in the channel.
2014-05-22 16:24:24 +02:00
ee22246507 Allow specification of search domain in ahost
Add the "-s domain" command line option to override the search
domains.
2014-05-22 16:21:56 +02:00
0004f498dc Revert "ares_parse_aaaa_reply: fix leak when reply contains 1 alias and no address"
This reverts commit 440110b303.
2014-05-12 20:00:36 +02:00
440110b303 ares_parse_aaaa_reply: fix leak when reply contains 1 alias and no address 2014-05-07 13:47:22 +02:00
bc529dd0c2 ares_build.h: fix building on 64-bit powerpc
There are two issues.

1. gcc actually does not use __ppc__ and __ppc64__ but __PPC__ and
__PPC64__.  The tests of __ILP32__ and __LP64__ are sufficient for gcc.

2. clang defines __GNU__ and defines both __ppc64__ and __ppc__ when
targeting ppc64.  This makes CARES_SIZEOF_LONG to be 4 on a ppc64 system
when building with clang.

My patch is two change the order of the checks so that we check the
64-bit case first.
2014-02-16 22:54:45 +01:00
d5d3871335 refresh: updated now with automake 1.14 2013-11-15 23:52:39 +01:00
4aa1fc4163 single_domain: Invalid memory access for empty string input
We noticed a small buglet in ares_search() when it gets an empty string
as input -- the single_domain() utility function in ares_search.c
accesses invalid memory (before the start of the string).
2013-11-12 17:40:42 -08:00
c8ec633bf5 Fixed warning 'type specifier missing'. 2013-08-31 22:40:22 +02:00
83ab208e83 ares_rules.h: CARES_SIZEOF_LONG doesn't exist anymore, don't test for it
It was removed in f19387dd72
2013-08-30 23:03:07 +02:00
f19387dd72 nowarn: use <limits.h> instead of configure for size of long
This makes the header file much more multi-arch friendly and can be used
as-is with both 32 bit and 64 bit builds.
2013-08-27 13:36:41 +02:00
efdd616118 timeoffset: made static and private
ares__timeoffset() was only used once within this single source file
2013-08-27 13:06:57 +02:00
30c9031afa timeadd: make static
ares__timeadd() was only ever used from within the same source
2013-08-27 13:02:35 +02:00
742e234855 xc-am-iface.m4: comments refinement 2013-07-18 16:03:21 +02:00
68b3c67e61 configure: fix 'subdir-objects' distclean related issue
See XC_AMEND_DISTCLEAN comments for details.
2013-07-18 04:20:31 +02:00
d69ae9c6f8 configure: automake 1.14 compatibility tweak (use XC_AUTOMAKE) 2013-07-09 00:10:38 +02:00
9540d48184 xc-am-iface.m4: provide XC_AUTOMAKE macro 2013-07-09 00:07:27 +02:00
f8a2354016 gitignore: ignore all ares_*pdf but also CHANGES.dist 2013-05-12 16:10:47 +02:00