[ldns-users] Various fixes

Willem Toorop willem at nlnetlabs.nl
Wed Aug 22 12:22:00 UTC 2012


Hello Vitaly,

Op 05-08-12 20:32, Vitaly Magerya schreef:
> Hi, folks. I've been writing a bind9-host replacement using ldns,
> and there's a number of problems with the library I've run into:

Interesting. Will it be open source? Is there a webpage for it?

> 1. ldns_resolver_nameservers_randomize (resolver.c) shuffles
> _nameservers array, but does not shuffle _rtt array; I think
> both arrays should be kept in sync.

Absolutely.

> 2. ldns_dname_cat_clone (dname.c) does not check if the resulting
> domain name is too long. I'm not sure if this is by design.

I'm not including your fix for this, because the checks for
LDNS_MAX_DOMAINLEN are already in the conversion functions (from and to
host, str and wire). Also ldns_dname_cat_clone might be used for
intermediate operations and doesn't necessarily have to return a
standards compliant dname (yet).

> 3. ldns_pkt_push_rr (packet.c) does not check for errors, and
> always returns true.

Indeed.

> I'm attaching a patch to fix these problems (it's rather trivial),
> hope you'll find it useful.

Very, thanks!
Applied in revision 3712

-- Willem





More information about the ldns-users mailing list