Mike Blumenkrantz | 6 Sep 01:35 2011

c-ares 1.7.5 returns ARES_ENODATA instead of ARES_SUCCESS

Having made no changes to our code, the Enlightenment library ecore
(https://svn.enlightenment.org/svn/e/trunk/ecore/src/lib/ecore_con/ecore_con_ares.c)
is broken when c-ares functionality is enabled using version 1.7.5 of c-ares.
Instead of returning ARES_SUCCESS as was previously the case, ares will always
return ARES_ENODATA, rendering the entire library useless.

--

-- 
Mike Blumenkrantz
Zentific: Coding in binary since '10.

Yang Tse | 6 Sep 18:55 2011
Picon

Re: c-ares 1.7.5 returns ARES_ENODATA instead of ARES_SUCCESS

2011/9/6 Mike Blumenkrantz <mike@...> wrote:

> Having made no changes to our code, the Enlightenment library ecore
> (https://svn.enlightenment.org/svn/e/trunk/ecore/src/lib/ecore_con/ecore_con_ares.c)
> is broken when c-ares functionality is enabled using version 1.7.5 of c-ares.
> Instead of returning ARES_SUCCESS as was previously the case, ares will always
> return ARES_ENODATA, rendering the entire library useless.

http://www.chiark.greenend.org.uk/~sgtatham/bugs.html

--

-- 
-=[Yang]=-

Picon

ares_parse_soa_reply()


Hello,

We are using c-ares to develop a fastflux
(http://en.wikipedia.org/wiki/Fast_flux) monitor so we need to do a
lot of A and SOA requests. We've developed the function necessary to
parse SOA replies and in a near future we are planning to add NS
requests to check doubleflux domains.

We are interested in submitting this code to the project. Which is the
best way to do that?

Greetings,

J. Valentín Gutiérrez
Security Engineer at INTECO-CERT
http://cert.inteco.es/
Vincent Torri | 22 Sep 09:08 2011
Picon

Re: c-ares 1.7.5 returns ARES_ENODATA instead of ARES_SUCCESS


On Tue, Sep 6, 2011 at 6:55 PM, Yang Tse <yangsita-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
2011/9/6 Mike Blumenkrantz <mike-n7nqhmouzSVWk0Htik3J/w@public.gmane.org> wrote:

> Having made no changes to our code, the Enlightenment library ecore
> (https://svn.enlightenment.org/svn/e/trunk/ecore/src/lib/ecore_con/ecore_con_ares.c)
> is broken when c-ares functionality is enabled using version 1.7.5 of c-ares.
> Instead of returning ARES_SUCCESS as was previously the case, ares will always
> return ARES_ENODATA, rendering the entire library useless.

http://www.chiark.greenend.org.uk/~sgtatham/bugs.html

--
-=[Yang]=-
 
it would be the ares_gethostbyaddr() function which does not fill correctly the status value in the callback ?
Jakub Hrozek | 22 Sep 09:42 2011
Picon

Re: ares_parse_soa_reply()

On Tue, Sep 20, 2011 at 04:35:49PM +0200, José Valentín Gutiérrez Boquete wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hello,
> 
> We are using c-ares to develop a fastflux
> (http://en.wikipedia.org/wiki/Fast_flux) monitor so we need to do a
> lot of A and SOA requests. We've developed the function necessary to
> parse SOA replies and in a near future we are planning to add NS
> requests to check doubleflux domains.
> 
> We are interested in submitting this code to the project. Which is the
> best way to do that?
> 

Just send a patch :-)

Picon

Re: ares_parse_soa_reply()


Ok, i'll submit a patch when I fix this little issue:

I've found that some domains, usually fastflux domains, when they're
asked for their SOA registry their answer is a chain of CNAMEs. In our
current implementation we're ignoring this behavior and returning
ARES_EBADRESP. That should be the desired behavior of c-ares? If it's
needed to allow CNAMEs on SOA queries, how would be returned to the user?

Currently we are using the structure showed below:

struct ares_soa_reply {
  unsigned char          *mname;
  size_t                 mname_length;
  unsigned char          *rname;
  size_t                 rname_length;
  unsigned int           serial;
  unsigned int           refresh;
  unsigned int           retry;
  unsigned int           expire;
  unsigned int           minimum;
};

If CNAMEs are allowed we could use something like:

struct ares_soa_reply {
  unsigned char          *mname;
  size_t                 mname_length;
  char                   *rname;
  size_t                 rname_length;
  unsigned int           serial;
  unsigned int           refresh;
  unsigned int           retry;
  unsigned int           expire;
  unsigned int           minimum;
  unsigned char          **aliases;
  unsigned int           naliases;
};

On 22/09/2011 9:42, Jakub Hrozek wrote:
> On Tue, Sep 20, 2011 at 04:35:49PM +0200, José Valentín Gutiérrez
> Boquete wrote:
>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
>> 
>> Hello,
>> 
>> We are using c-ares to develop a fastflux 
>> (http://en.wikipedia.org/wiki/Fast_flux) monitor so we need to do
>> a lot of A and SOA requests. We've developed the function
>> necessary to parse SOA replies and in a near future we are
>> planning to add NS requests to check doubleflux domains.
>> 
>> We are interested in submitting this code to the project. Which
>> is the best way to do that?
>> 
> 
> Just send a patch :-)

arjun sj | 30 Sep 15:33 2011
Picon

need information : option to set network interface for the DNS requests.

Hi All,
 
Is there a way in which you can set the network interface to which the DNS requests can be bound to.
We have a project which requires to use a highpriority streaming session go through one interface and all the other requests channeled through the second one.
 
example: setting 'eth0' so that all the ares requests will go through 'eth0' and not on 'wlan0'.
 
I was not able to find any API in c-ares (in ares_init_options() API) that gives this option of setting interface.
 
Can you please let me know if there is some way to achive this or if I missed something.
 
Thanks,
Arjun
Ben Greear | 30 Sep 17:59 2011

Re: need information : option to set network interface for the DNS requests.

On 09/30/2011 06:33 AM, arjun sj wrote:
> Hi All,
> Is there a way in which you can set the network interface to which the DNS requests can be bound to.
> We have a project which requires to use a highpriority streaming session go through one interface and all
the other requests channeled through the second one.
> example: setting 'eth0' so that all the ares requests will go through 'eth0' and not on 'wlan0'.
> I was not able to find any API in c-ares (in ares_init_options() API) that gives this option of setting interface.
> Can you please let me know if there is some way to achive this or if I missed something.
> Thanks,
> Arjun

Yes, there is:

These are some snippets from my curl patches at:
https://github.com/greearb/curl

You don't need any of my curl patches, but they could be
an example of how to set these things in c-ares.  You should
be able to search through the c-ares code and man pages to
find info on these methods as well.

  ares_set_local_dev((ares_channel)data->state.resolver, va_arg(param, char *));
  ares_set_local_ip4((ares_channel)data->state.resolver, va_arg(param, uint32_t));
  ares_set_servers_csv((ares_channel)data->state.resolver, va_arg(param, const char*));

Thanks,
Ben

--

-- 
Ben Greear <greearb@...>
Candela Technologies Inc  http://www.candelatech.com


Gmane