[rbldnsd] Option -d (Bind dump) and wildcards: a small problem

Michael Tokarev mjt at tls.msk.ru
Sun Dec 12 21:18:39 MSK 2004


Amos Jeffries wrote:
> Okay,
>   I have been working on this a bit more.

Thank you, Amos!

> I can see what you mean by ugly.
> It should now fill in the 'holes' so every IP that should be listed has 
> at least one relevant RR and exclusions are dealt with cleanly.
> 
> The only potential problem I can see is if there is a /16 exclusion and 
> a few /32 listed inside it.
> The /32 will appear as listed, the /16 itself and all implicit /24 below 
> get ignored nicely.

What's a problem in that?

> Code for the replacement ds_ip4set_dump function is at
> http://eyezone.mine.nu/source/rbldnsd/rbldnsd_ip4set_dump.c
> for checkup testing and approval.
> I have debugged it as far as logic and compiling against 0.993.1 (29 Jul 2004).

Got it.  Care to explain how it works? ;)
Funny enouth, I can't seem to understand it.

I see at least one obvious problem with the code.

Basically, what missing is the lengths of all the 4 arrays -- *this*
should be in the loop condition and everywhere else.  The dsd->e[]
arrays aren't 0-terminated, but there's dsd->n[] wich specifies lengths
of arrays, in numbers of elements.  It should be easy to "fix" - either
in the dumping routine by changing all the conditions from !list[X] to
be list[X] < end[X], or by changing the reading routine to always add
last "terminator" entry.

/mjt


More information about the rbldnsd mailing list