[ldns-users] redefinition of bool, overlap of Z and DO in EDNS
jv at fcelda.cz
Tue Apr 4 17:03:14 UTC 2017
Hello ldns developers.
I have some more patches for ldns in queue. But first I want to make
sure that all the changes make sense and that I'm not making your job
difficult. Is the repository on GitHub  supported and open for pull
requests? It seems a bit behind the official one . It's easier for
me to send contribution via pull request than via e-mail.
I also just noticed that all tags disappeared from the official
repository. Please, can you check?
We have been using ldns in C++ but hit the problem that ldns redefines
default bool type in common.h . That breaks some constexpr
definitions which involve boolean types and follow that include. Ugly
workaround is to include ldns.h and then undefine true, false, and
bool. Does the code still make sense today? Can I just update the
macro conditions to include stdbool.h with C and do nothing with C++?
And the last thing: The ldns_pkt_set_edns_z() function clears the DO
flag. This looks intentional. But the only way to clear all but DO
flag in EDNS (if I want to use ldns API) is to read the DO flag, use
the function above the clear all flags, and set DO to its original
value. This is confusing as EDNS(0) RFC  shows Z and DO as separate
fields. I was thinking about changing getter/setter function for Z to
exclude DO flag. Does it make sense or do you suggest different
More information about the ldns-users