Re: can anybody review my patchset?

Mark Johnson <[email protected]>
Newsgroups gmane.network.djbdns
Message-ID <[email protected]>
On Mon, Apr 20, 2009 at 3:51 AM, Matthew Dempsky <[email protected]> wrote:
> On Mon, Apr 20, 2009 at 12:29 AM, Andreas Schulze
> <[email protected]> wrote:
>> 6. dnscache rotating A-Records http://thomas.mangin.com/data/source/djbdns-round-robin.patch.bz2

That does seem to be a popular feature.

> Ignoring that, dnscache currently serves recordsets in the same order
> that servers send to it.  I don't see any harm in dnscache permuting
> the order of A records within a recordset, but if you want this sort
> of functionality I would instead do the permutation in query.c rather
> than cache.c like below.  (Patch below just uses dns_sortip.)
>
> (I still don't care for this patch either, because I don't like the
> idea of the client mutating the data already in the cache, but
> cache_get returns a "char *" instead of a "const char *", so I guess
> this is okay...)
>
> --- query.c.orig        2009-04-20 01:46:12.000000000 -0700
> +++ query.c     2009-04-20 01:47:01.000000000 -0700
> @@ -337,6 +337,7 @@ static int doit(struct query *z,int stat
>          goto LOWERLEVEL;
>        }
>
> +       dns_sortip(cached,cachedlen);
>        log_cachedanswer(d,DNS_T_A);
>        if (!rqa(z)) goto DIE;
>        while (cachedlen >= 4) {
>

I've seen variations of the round-robin patch that trigger off of an
environment variable.  Thoughts?

This is one of those features that I'm not sure I personally care much
for, but I've had people tell me it's a must-have for them.  I'm
considering it for zinq-djbdns-0.07.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.