Subject: Re: ares_parse_soa_reply()

Re: ares_parse_soa_reply()

From: José Valentín Gutiérrez Boquete <jvgutierrez_at_cert.inteco.es>
Date: Thu, 22 Sep 2011 11:35:03 +0200

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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 :-)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOewFHAAoJEMVcxEWyeZjN8GcH/RWgtdpNQkB9lzqwBHK2dO5N
u89LWtbaFzQcFTjsjAG1quRDe8ZAa+5R/nRJFlxgh5MT+Zrxae4QwpuAN3Wt3cG/
emg7K+VnxIIIAmZ9GOuaoZHIbkDgxJ5wxPNRpyuJus1mim+81inB6zTsVdwdPiYZ
CbD2OXqLJMjOyDSyzfbPYOEeKbv4hngy7dslOvIZAr7OD/+2+WUAu6NQUJOvktvF
wKoGJm6uwG2xbHBhRS/f7Su8PtbsCn2ILJiusxyojMj9rPJR31+ijPlH/WYfkCWK
1HmCiEnXyHvpveGKWup6MsaH+2Avrk1Dt95lQ8ZSSO4A9e8t1CT07HopW0WxUho=
=heSz
-----END PGP SIGNATURE-----
Received on 2011-09-22