Re: Unit test suite for c-ares

2015-10-09 Thread Jakub Hrozek
On Fri, Oct 09, 2015 at 11:14:30AM +0100, David Drysdale wrote: > Hi folks, > > I've made a start on a unit test suite for c-ares, and I'd be > interested in any feedback. > > The changes so far are in a branch at > https://github.com/daviddrysdale/c-ares/commits/test, with some key > points

Re: Unit test suite for c-ares

2015-10-09 Thread Jakub Hrozek
On Fri, Oct 09, 2015 at 01:36:20PM +0100, David Drysdale wrote: > On Fri, Oct 9, 2015 at 12:22 PM, Jakub Hrozek <jhro...@redhat.com> wrote: > > On Fri, Oct 09, 2015 at 11:14:30AM +0100, David Drysdale wrote: > >> Hi folks, > >> > >> I've made a star

Re: 'c-ares' support mDNS queries?

2014-12-11 Thread Jakub Hrozek
On Thu, Dec 11, 2014 at 12:31:54PM +, Vinay Kumar wrote: Hi All, Does 'c-ares' support mDNS queries?I used 'ares_gethostbyname' to resolve a host name to IP addresses within small networks that do not include a local name server. 'ares_gethostbyname' fails, but 'getaddrinfo' succeeds. 

Re: [PATCH] ares_parse_txt_reply: add `record_start` field

2014-12-11 Thread Jakub Hrozek
On Thu, Dec 11, 2014 at 09:54:47AM +0100, Daniel Stenberg wrote: On Thu, 11 Dec 2014, Jakub Hrozek wrote: You want me to add a couple of `void*`? I was thinking: uint8_t reserved[16]; Another way, which is one I've used elsewhere, is this: struct larger_in_future { int age

Re: 'c-ares' api 'ares_gethostbyname()' is thread safe function?

2014-12-11 Thread Jakub Hrozek
On Thu, Dec 11, 2014 at 12:43:08PM +, Vinay Kumar wrote: Hi All, Is 'c-ares' api 'ares_gethostbyname()' is thread safe function?The 'gethostbyname' function is obsolete. There exists a reentrant version  gethostbyname_r(). Similarly is there any reentrant version of 

Re: Is 'c-ares-1.10.0' LSB3.0 compliance?

2014-12-07 Thread Jakub Hrozek
On Sat, Dec 06, 2014 at 08:28:50AM +, Vinay Kumar wrote: Hi All, Is  'c-ares-1.10.0'  'c-ares-1.10.0' LSB3.0 compliance? Regards,Vinay   What do you mean in particular? And more importantly..why would you be interested in that? btw c-ares is quite cross-platform, so targeting any

Re: Patch: support for AIX /etc/netsvc.conf

2014-12-07 Thread Jakub Hrozek
On Mon, Nov 24, 2014 at 04:23:46PM +0100, Leif Thuresson wrote: Added minimal support for AIX /etc/netsvc.conf file regards, /Leif Hi Leif, thank you very much for the patch! Unfortunately I don't have access to an AIX machine, but one idea I have would be to enable the code only

Re: Periodic Coverity Scan

2014-11-06 Thread Jakub Hrozek
On Mon, Nov 03, 2014 at 09:58:12AM +, David Drysdale wrote: On Sat, Nov 1, 2014 at 3:05 PM, Jakub Hrozek jhro...@redhat.com wrote: On Fri, Sep 19, 2014 at 10:55:46AM +0100, David Drysdale wrote: On Thu, Sep 18, 2014 at 6:17 PM, Jakub Hrozek jhro...@redhat.com wrote: On Thu, Sep

Re: [Patch] Comment in ares_ipv6.h

2014-07-28 Thread Jakub Hrozek
On Mon, Jul 28, 2014 at 07:01:37PM +0200, Gisle Vanem wrote: Jakub Hrozek jhro...@redhat.com wrote: The content is fine, but can you send a git-formatted version of the patch? It's much easier to apply.. Attached. Hope this is on a suitable form. --gv Looks good to me! And thanks

Re: [Patch] Comment in ares_ipv6.h

2014-07-28 Thread Jakub Hrozek
On Mon, Jul 28, 2014 at 08:27:29PM +0200, Jakub Hrozek wrote: On Mon, Jul 28, 2014 at 07:01:37PM +0200, Gisle Vanem wrote: Jakub Hrozek jhro...@redhat.com wrote: The content is fine, but can you send a git-formatted version of the patch? It's much easier to apply.. Attached. Hope

Re: Patch for fixing the slow DNS lookup issue

2014-07-25 Thread Jakub Hrozek
On Fri, Jul 25, 2014 at 09:34:23AM +0100, David Drysdale wrote: How about the attached? From ede0f84b8e9cfe4eeaafb1c90e5fea006e19fe5e Mon Sep 17 00:00:00 2001 From: David Drysdale drysd...@google.com Date: Fri, 25 Jul 2014 09:28:46 +0100 Subject: [PATCH] CONTRIBUTING: add file to indicate

Re: AF_UNSPEC doesn't fall back to IPv4 if only CNAME is returned

2014-07-24 Thread Jakub Hrozek
On Thu, Jul 24, 2014 at 09:47:10AM +0100, David Drysdale wrote: On Wed, Jul 23, 2014 at 4:59 PM, Jakub Hrozek jhro...@redhat.com wrote: Hi, I'm seeing the behaviour described in $SUBJECT with git head of c-ares and I'd like to discuss the best way of fixing it. If you search

Re: AF_UNSPEC doesn't fall back to IPv4 if only CNAME is returned

2014-07-24 Thread Jakub Hrozek
On Thu, Jul 24, 2014 at 11:24:23AM +0100, David Drysdale wrote: On Thu, Jul 24, 2014 at 10:53 AM, Jakub Hrozek jhro...@redhat.com wrote: On Thu, Jul 24, 2014 at 09:47:10AM +0100, David Drysdale wrote: On Wed, Jul 23, 2014 at 4:59 PM, Jakub Hrozek jhro...@redhat.com wrote: Hi

Re: AF_UNSPEC doesn't fall back to IPv4 if only CNAME is returned

2014-07-24 Thread Jakub Hrozek
On Thu, Jul 24, 2014 at 04:53:45PM +0100, David Drysdale wrote: On Thu, Jul 24, 2014 at 3:12 PM, Jakub Hrozek jhro...@redhat.com wrote: On Thu, Jul 24, 2014 at 11:24:23AM +0100, David Drysdale wrote: On Thu, Jul 24, 2014 at 10:53 AM, Jakub Hrozek jhro...@redhat.com wrote: On Thu

Re: Patch for fixing the slow DNS lookup issue

2014-07-24 Thread Jakub Hrozek
On Thu, Jul 24, 2014 at 05:11:41PM +0100, David Drysdale wrote: On Mon, May 26, 2014 at 9:08 AM, Jakub Hrozek jhro...@redhat.com wrote: On Sat, May 24, 2014 at 02:29:16PM +0200, Daniel Stenberg wrote: On Thu, 22 May 2014, Jakub Hrozek wrote: I can't comment on the patch contents

AF_UNSPEC doesn't fall back to IPv4 if only CNAME is returned

2014-07-23 Thread Jakub Hrozek
Hi, I'm seeing the behaviour described in $SUBJECT with git head of c-ares and I'd like to discuss the best way of fixing it. If you search with ares_gethostbyname() with lookup family set to AF_UNSPEC, the first family to try would be AF_INET6. The code would jump to host_callback() on

Re: A patch to fix nsort initialization

2014-07-23 Thread Jakub Hrozek
On Thu, Jul 03, 2014 at 12:24:42PM +0400, Александр Драчевский wrote: 03.07.2014, 11:02, David Drysdale drysd...@google.com: Shouldn't the line:   if (channel-nsort 0) be:   if (options-nsort 0) instead? Yes, sure. Thank you. Hi Alexander, are you going to re-send another

Re: [PATCH] Move memset call below platform-specific declarations

2014-07-23 Thread Jakub Hrozek
On Wed, Jul 23, 2014 at 06:02:33PM +0200, Jakub Hrozek wrote: On Tue, Jul 01, 2014 at 09:47:43AM +0100, David Drysdale wrote: On Tue, Jul 1, 2014 at 9:36 AM, Jakub Hrozek jhro...@redhat.com wrote: On Mon, Jun 09, 2014 at 10:22:23AM +0100, David Drysdale wrote: Hi folks

Re: [PATCH] ares_parse_txt_reply: add `record_start` field

2014-05-27 Thread Jakub Hrozek
On Tue, May 27, 2014 at 12:53:41AM +0400, Fedor Indutny wrote: Agreed, will look into implementing it. Would you consider also adding TTL when creating this ares_parse_txt2 ? On Tue, May 27, 2014 at 12:50 AM, Daniel Stenberg dan...@haxx.se wrote: On Thu, 22 May 2014, Fedor Indutny

Re: Patch for fixing the slow DNS lookup issue

2014-05-26 Thread Jakub Hrozek
On Sat, May 24, 2014 at 02:29:16PM +0200, Daniel Stenberg wrote: On Thu, 22 May 2014, Jakub Hrozek wrote: I can't comment on the patch contents myself at all, because I'm not a Windows developer, but I guess it would be easier for others to review if the patch was a git-formatted one

Re: Patch for fixing the slow DNS lookup issue

2014-05-22 Thread Jakub Hrozek
On Thu, May 22, 2014 at 01:43:53PM +0800, Lei Shi wrote: Hello, everyone This patch include two major change groups. one 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

Re: [Patch] Inability to override search domains

2014-05-22 Thread Jakub Hrozek
On Thu, May 22, 2014 at 10:30:05AM +0200, Jakub Hrozek wrote: On Mon, May 19, 2014 at 09:13:24PM +0200, Jakub Hrozek wrote: On Fri, Jan 24, 2014 at 03:38:37PM +, David Drysdale wrote: Hi Daniel, I don't think it's currently possible to explicitly set the search domains for c

Re: Cancelling in-flight DNS request

2014-05-22 Thread Jakub Hrozek
On Sat, Apr 19, 2014 at 08:41:34PM +0200, David Guillen Fandos wrote: Hello, I just wondered whether it was possible to cancel an in-flight request for a particular host without cancelling them all. For example, let's say I query two DNS requests using ares_gethostbyname and I keep looping

[PATCH] ares_parse_soa_reply: Do not leak rr_name on allocation failure

2014-05-19 Thread Jakub Hrozek
Hi, attached is a simple patch that prevents a leak in case malloc failed. Found by Coverity scanner. From 2f475a5da65eec17c58c6e2b71bdbe8462be7139 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek jhro...@redhat.com Date: Mon, 19 May 2014 21:01:47 +0200 Subject: [PATCH] ares_parse_soa_reply: Do

Re: [Patch] Inability to override search domains

2014-05-19 Thread Jakub Hrozek
On Fri, Jan 24, 2014 at 03:38:37PM +, David Drysdale wrote: Hi Daniel, I don't think it's currently possible to explicitly set the search domains for c-ares -- any values specified in ares_options get overwritten by the values from /etc/resolv.conf. Looking back through the history,

Re: Multilib issue with c-ares

2013-08-29 Thread Jakub Hrozek
On Wed, Aug 28, 2013 at 10:28:56PM +0200, Daniel Stenberg wrote: On Tue, 27 Aug 2013, Daniel Stenberg wrote: If they all support limits.h *or* have 32 bit longs... I've pushed my solution now! Great, thank you!

Re: Multilib issue with c-ares

2013-08-26 Thread Jakub Hrozek
On Mon, Aug 26, 2013 at 04:28:54PM +, Gregor Jasny wrote: Hello On 8/26/13 4:43 PM, Markus Rothe mar...@unixforces.net wrote: I have a problem using c-ares in a multilib environment, for which I found a patch in Fedora that does not seem to have found its way upstream. Hi, I

Re: Ares on mobile devices / IP address changes / DNS server changes

2013-07-31 Thread Jakub Hrozek
On Wed, Jul 31, 2013 at 02:58:31PM +, Mark Delany wrote: On 31Jul13, Daniel Pocock allegedly wrote: - if the application discovers new DNS servers (or if Ares has a way of Unfortunately that's what I've had to do. Monitor for DNS server changes and create a new ares channel. In SSSD,

Re: Proposal for unittests

2013-04-26 Thread Jakub Hrozek
On Fri, Apr 26, 2013 at 09:47:02AM +0200, Patrick Valsecchi wrote: Hi, In attachment, you'll find a small prototype of a unittest suite for c-ares. I didn't integrate it with the autotools stuff, since I don't know it (we use cmake). For the moment, it is only testing the

Re: ares_parse_txt_reply's output is not usable for DNS-SD

2013-04-23 Thread Jakub Hrozek
On Mon, Apr 15, 2013 at 12:51:06PM +0200, Tommie Gannert wrote: 2013/4/15 Tommie Gannert tom...@spotify.com 2013/4/15 Patrick Valsecchi pvals...@cisco.com The first sub-string is fine, but with the second sub-string, the code in ares_parse_txt.c (c-ares version 1.9.1) will have a bad

Re: ares_parse_txt_reply's output is not usable for DNS-SD

2013-04-23 Thread Jakub Hrozek
On Mon, Apr 22, 2013 at 11:34:25PM +0200, Daniel Stenberg wrote: On Tue, 16 Apr 2013, Patrick Valsecchi wrote: Good point, thanks! Here is the patch V2. Thanks, merged and pushed now! Hi Daniel, are you planning on releasing another point version of c-ares with these fixes in? Or should

Re: c-ares segfault in gehostbyname on windows

2011-08-10 Thread Jakub Hrozek
On Tue, Aug 09, 2011 at 09:22:48PM +0200, Daniel Stenberg wrote: If anyone has things to get into the repo before then, please remind us and/or speak up! It would be awesome if someone could review my patch to only perform address family callback in the AF_UNSPEC case:

Timeout best practices

2011-08-10 Thread Jakub Hrozek
Hi, I'd like to ask how other people use c-ares with respect to handling timeouts. In general, we would like to tell c-ares resolve foo.bar and if it takes more than N seconds, just cancel the request. Since there is no explicit API to cancel a particular request on-demand (from our event loop,

Re: ares_gethostbyname fails to resolve localhost with AF_INET6

2011-06-30 Thread Jakub Hrozek
On 06/13/2011 07:40 AM, Jakub Hrozek wrote: On 06/13/2011 12:01 PM, Daniel Stenberg wrote: On Sun, 12 Jun 2011, Jakub Hrozek wrote: With that in mind, would c-ares upstream accept a patch that only falls back in case of AF_UNSPEC? In my mind that makes perfect sense so unless someone can

[PATCHES] Free rr_name on failures in parsing functions

2011-06-14 Thread Jakub Hrozek
2001 From: Jakub Hrozek jhro...@redhat.com Date: Tue, 14 Jun 2011 16:40:07 +0200 Subject: [PATCH 1/4] Do not leak rr_name on failures inside ares_parse_ns_reply --- ares_parse_ns_reply.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/ares_parse_ns_reply.c b

[PATCH] ares_free_hostent(NULL) should be a noop

2011-06-13 Thread Jakub Hrozek
pointers to NULL at declaration time and at cleanup, just free them all. Jakub From d8d61c6d16759c601ef641ff53862ae083ed5dd0 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek jhro...@redhat.com Date: Mon, 13 Jun 2011 18:21:08 +0200 Subject: [PATCH] ares_free_hostent(NULL) should be a noop

Re: c-ares commit emails list

2010-03-25 Thread Jakub Hrozek
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/25/2010 01:14 PM, Daniel Stenberg wrote: Hello! Since we no longer piggyback on curl's commit list, I've created a new mailing list that (only) sends emails on all changes in the git repo:

Re: [PATCH] Allow the use of IPv6 nameservers

2010-02-25 Thread Jakub Hrozek
: Jakub Hrozek jhro...@redhat.com Date: Mon, 1 Feb 2010 21:23:59 +0100 Subject: [PATCH 1/2] Allow the use of IPv6 nameservers This patch allows the use of IPv6 addresses for nameserves in both /etc/resolv.conf and by using the ares_set_nameservers() API. --- Makefile.inc |3 + ares.h

Re: [PATCH] Allow the use of IPv6 nameservers

2010-02-19 Thread Jakub Hrozek
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/18/2010 04:59 PM, Yang Tse wrote: 2010/2/12, Jakub Hrozek wrote: A new patch is attached that also fixes ares_dup() and adds the manpage. Apart from the high-level summary in the patch itself, here's the changes: * struct server state

Re: Approaching 1.7.0

2009-11-30 Thread Jakub Hrozek
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/23/2009 01:23 PM, Daniel Stenberg wrote: Hey ho Okay, with Yang Tse's recent commit frenzy we should be approaching a release. I'm thinking release at the end of this week unless something big pops up. Anyone have anything else we

Re: [PATCH] ares_free_reply (Was: Re: [PATCH] ares_parse_txt_reply)

2009-11-19 Thread Jakub Hrozek
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/09/2009 05:08 PM, Yang Tse wrote: Jakub, I haven't forgotten you. Its simply I'm very short of time. You're the next on my list. Cheers, Thank you, Yang. I really appreciate it! Just to shed some light on why I am hoping for a new

[PATCH] ares_free_reply (Was: Re: [PATCH] ares_parse_txt_reply)

2009-11-02 Thread Jakub Hrozek
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/31/2009 11:33 PM, Daniel Stenberg wrote: On Fri, 30 Oct 2009, Jakub Hrozek wrote: So, what about a slight change in the external structures: struct ares_srv_reply { data struct ares_srv-reply *next; } and have the private

Re: [PATCH] ares_free_reply (Was: Re: [PATCH] ares_parse_txt_reply)

2009-11-02 Thread Jakub Hrozek
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/02/2009 07:59 PM, Yang Tse wrote: It is obvious that the difference is directly storing an ares_[txt|srv]_reply struct in the 'ares private internal struct' or storing a pointer to a dynamically allocated ares_[txt|srv]_reply struct. Just

Re: [PATCH] ares_parse_txt_reply

2009-10-30 Thread Jakub Hrozek
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/29/2009 11:55 AM, Daniel Stenberg wrote: On Thu, 29 Oct 2009, Jakub Hrozek wrote: All it would take is that we make sure we include a hint in the returned data about what struct it is so that we can detect that in the free function

Re: [PATCH] ares_parse_txt_reply

2009-10-29 Thread Jakub Hrozek
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 All it would take is that we make sure we include a hint in the returned data about what struct it is so that we can detect that in the free function and then do the correct cleanup. Well, from the point of view of the API user something along

Re: [PATCH] ares_parse_txt_reply

2009-10-29 Thread Jakub Hrozek
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/29/2009 11:55 AM, Daniel Stenberg wrote: Right, those that return a standard struct we can't do much about. I really don't think we should add new APIs that return such structs but we can leave the exsisting as they are to not stir anything

Re: [PATCH] ares_parse_txt_reply

2009-10-29 Thread Jakub Hrozek
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/29/2009 10:30 PM, Daniel Stenberg wrote: On Thu, 29 Oct 2009, Yang Tse wrote: Just a heads-up on this issue, CVS c-ares fails to compile for more than twelve hours now. Are there any plans to fix/revert this before daily snapshot?

Re: [PATCH] ares_parse_srv_reply

2009-10-28 Thread Jakub Hrozek
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/27/2009 07:47 PM, Yang Tse wrote: Hi Jakub, It seems we still lack in CVS an ares_parse_srv_reply man page for the provided function. Cheers, Yang, I am confused now. Both my CVS tree and the CVS web UI[1] show that there is a man

Re: New release?

2009-10-28 Thread Jakub Hrozek
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/27/2009 07:23 PM, Daniel Stenberg wrote: On Tue, 27 Oct 2009, Jakub Hrozek wrote: I know there had been a similar question asked by Daniel a couple of months back, but since then, some other patches landed..so I wanted to ask again - does

Re: Possible bug in (cvs) ares_parse_srv_reply.c /

2009-10-27 Thread Jakub Hrozek
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/26/2009 05:13 PM, Daniel Stenberg wrote: Personally I tend to prefer a strict usage where the arguments are not optional (ie they must not be NULL) and the function implementations can assume that they are set correctly as per the

New release?

2009-10-27 Thread Jakub Hrozek
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, I know there had been a similar question asked by Daniel a couple of months back, but since then, some other patches landed..so I wanted to ask again - does c-ares upstream plan a new release to facilitate the changes since 1.6.0? We

Re: [PATCH] ares_parse_srv_reply

2009-09-04 Thread Jakub Hrozek
On 09/04/2009 11:56 PM, Daniel Stenberg wrote: On Fri, 4 Sep 2009, Larry Lansing wrote: I have test code that proves that it successfully parses replies with single and multiple SRV response records. (Tested it against a capture from wireshark.) Thanks. And thanks Jakub Hrozek too