wouter at nlnetlabs.nl
Tue Feb 9 13:33:45 UTC 2016
-----BEGIN PGP SIGNED MESSAGE-----
On 07/02/16 00:29, Dag-Erling Smørgrav via Unbound-users wrote:
> Dag-Erling Smørgrav <des at des.no> writes:
>> When using unblock-lan-zones, you will more likely than not also
>> need to disable validation for these zones. The attached patch
>> adds a new configuration option, insecure-lan-zones, which adds
>> all AS112 zones to the list of insecure domains. Note that it
>> moves the list of AS112 zones, which is currently hardcoded in
>> services/localzone.c, into an array in util/as112.c.
Thank you for the patch, I have applied it to the source code! I like
the as112 array separation; makes it easier to maintain.
> I just found an error in the patch: to avoid "cast discards
> qualifier" warnings, as112_zones should be declared as "const
> char**" and not const "char* const*" (the definition of "equivalent
> types" in C makes it hard to use the correct type for const arrays
> of pointers to const objects, so the simplest solution is to not
> declare them as const). Your compiler may or may not care.
I'll go for portable, thank you for the hint.
> BTW, you consistently use "type* ptr" , but * is right-associative,
> so the correct notation would be "type *ptr". It makes no
> difference to the compiler, but to the human reader, it indicates
> that the * applies to the identifier and not to the type. For
> instance, "type* p1, p2" incorrectly suggests that both p1 and p2
> are pointers, when in fact only p1 is a pointer; "type *p1, p2"
> makes the difference clearer.
Yes, you are correct, I simply used this notation while writing it.
The code sometimes also uses your notation in places, depending on the
Automake, tried it, but getting all the conditional options configured
into automake is hard, and the initial automake-file that I ended up
with lost too much (most of the-) functionality of the original
Makefile. I thereafter rewrote the Makefile system to no longer
depend on gnu-make, but be portably compatible with bsd-make (and
sun-make). This resolved the practical necessity. But now we still
do not use automake.
Best regards, Wouter
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
-----END PGP SIGNATURE-----
More information about the Unbound-users