Re: [Dnsmasq-discuss] Announce: dnsmasq-2.77rc4
On 21/05/17 12:02, Matthias Andree wrote: > Am 20.05.2017 um 22:50 schrieb Simon Kelley: >> I've just mase the fourth, and probably final, release candidate for >> dnsmasq-27. Please download, compile and run, and report any problems >> ASAP. If all looks OK, 2.77 will happen in the next week. >> >> http://www.thekelleys.org.uk/dnsmasq/release-candidates/dnsmasq-2.77rc4.tar.gz > > Finally, IDN2 and all-i18n do not appear to get along well, because > i18n insists on IDN. > > I've removed the automatic enable IDN with i18n. Doesn't make sense when there are options for IDN. Cheers, Simon. ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Announce: dnsmasq-2.77rc4
On 21/05/17 11:38, Matthias Andree wrote: > Am 20.05.2017 um 22:50 schrieb Simon Kelley: >> I've just mase the fourth, and probably final, release candidate for >> dnsmasq-27. Please download, compile and run, and report any problems >> ASAP. If all looks OK, 2.77 will happen in the next week. >> >> http://www.thekelleys.org.uk/dnsmasq/release-candidates/dnsmasq-2.77rc4.tar.gz > > Three issues during compilation on FreeBSD 10.3 amd64, which look like > genuine bugs, and the forward.c seem critical > - these should likely be "server->flags & SERV_DO_DNSSEC), with & not &&. > Yuck. those came from an external patch, but I should have caught them. >> forward.c:902:60: warning: use of logical '&&' with constant operand >> [-Wconstant-logical-operand] >> >> option_bool(OPT_DNSSEC_NO_SIGN) && (server->flags && SERV_DO_DNSSEC), >> NULL, NULL); >> >> >> ^ ~~ >> forward.c:902:60: note: use '&' for a bitwise operation >> >> option_bool(OPT_DNSSEC_NO_SIGN) && (server->flags && SERV_DO_DNSSEC), >> NULL, NULL); >> >> >> ^~ >> >> >> & >> forward.c:902:60: note: remove constant to silence this warning >> >> option_bool(OPT_DNSSEC_NO_SIGN) && (server->flags && SERV_DO_DNSSEC), >> NULL, NULL); >> >> >> ~^ >> forward.c:1480:59: warning: use of logical '&&' with constant operand >> [-Wconstant-logical-operand] >> >> option_bool(OPT_DNSSEC_NO_SIGN) && (server->flags && SERV_DO_DNSSEC), >> NULL, NULL); >> >> >> ^ ~~ >> forward.c:1480:59: note: use '&' for a bitwise operation >> >> option_bool(OPT_DNSSEC_NO_SIGN) && (server->flags && SERV_DO_DNSSEC), >> NULL, NULL); >> >> >> ^~ >> >> >> & >> forward.c:1480:59: note: remove constant to silence this warning >> >> option_bool(OPT_DNSSEC_NO_SIGN) && (server->flags && SERV_DO_DNSSEC), >> NULL, NULL); >> >> >> ~^ >> >> rfc2131.c:839:25: warning: data argument not used by format string >> [-Wformat-extra-args] >>service->basename, layer); >> ^ Taking the patch for this reluctantly. The original code seems better to me. Pity is confuses the compiler. > > I think you may want to resolve these before 2.77 release time. > > And when trying to strip down the build disabling all options I expose > in FreeBSD, I get these, which are cosmetic and, in the option.c case, > are bloat. > > The attached patch series (against Git master) fixes these. Use git am > to apply them in given order, and carefully review 0003* whether the > option_len() macro needs to be changed instead. > >> option.c:910:23: warning: unused function 'add_rev6' [-Wunused-function] >> static struct server *add_rev6(struct in6_addr *addr, int msize) >> ^ >> >> network.c:936:24: warning: unused variable 'l6' [-Wunused-variable] >> struct listener *l, *l6; >>^ > > You may consider resolving these before 2.77 with proper #ifdefs. I > don't care much. > > I have a policy of leaving such: why complicate the code even more than the ifdefs already do? Cheers, Simon. > > ___ > Dnsmasq-discuss mailing list > Dnsmasq-discuss@lists.thekelleys.org.uk > http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss > signature.asc Description: OpenPGP digital signature ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] 2.77rc5
Heads up. I just pushed another release candidate. http://www.thekelleys.org.uk/dnsmasq/release-candidates/dnsmasq-2.77rc5.tar.gz Cheers, Simon. ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Announce: dnsmasq-2.77rc4
I think my code has beaten the compiler. opt->source_netmask will remain set to zero on any code path which doesn't set addrp and inhibit the execution of the memcpy() Nevertheless I'll add a check, it took me 10 minutes to conince myself the able was true. Cheers, Simon. On 21/05/17 11:49, Matthias Andree wrote: > Am 20.05.2017 um 22:50 schrieb Simon Kelley: >> I've just mase the fourth, and probably final, release candidate for >> dnsmasq-27. Please download, compile and run, and report any problems >> ASAP. If all looks OK, 2.77 will happen in the next week. >> >> http://www.thekelleys.org.uk/dnsmasq/release-candidates/dnsmasq-2.77rc4.tar.gz >> > > GCC 5 and 6 also have this complaint, and they are right, unless you > prove that the address family is either AF_INET or AF_INET6. > If the latter isn't true, memcpy() copies to whichever garbage address > was in the stack and picked up by [auto] void *addrp. > > edns0.c: In function 'calc_subnet_opt': > edns0.c:350:7: warning: 'addrp' may be used uninitialized in this > function [-Wmaybe-uninitialized] >memcpy(opt->addr, addrp, len); >^ > > Cheers, > Matthias > > > > ___ > Dnsmasq-discuss mailing list > Dnsmasq-discuss@lists.thekelleys.org.uk > http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss > signature.asc Description: OpenPGP digital signature ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Announce: dnsmasq-2.77rc4
Am 20.05.2017 um 22:50 schrieb Simon Kelley: > I've just mase the fourth, and probably final, release candidate for > dnsmasq-27. Please download, compile and run, and report any problems > ASAP. If all looks OK, 2.77 will happen in the next week. > > http://www.thekelleys.org.uk/dnsmasq/release-candidates/dnsmasq-2.77rc4.tar.gz Finally, IDN2 and all-i18n do not appear to get along well, because i18n insists on IDN. ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Announce: dnsmasq-2.77rc4
Am 20.05.2017 um 22:50 schrieb Simon Kelley: > I've just mase the fourth, and probably final, release candidate for > dnsmasq-27. Please download, compile and run, and report any problems > ASAP. If all looks OK, 2.77 will happen in the next week. > > http://www.thekelleys.org.uk/dnsmasq/release-candidates/dnsmasq-2.77rc4.tar.gz > GCC 5 and 6 also have this complaint, and they are right, unless you prove that the address family is either AF_INET or AF_INET6. If the latter isn't true, memcpy() copies to whichever garbage address was in the stack and picked up by [auto] void *addrp. edns0.c: In function 'calc_subnet_opt': edns0.c:350:7: warning: 'addrp' may be used uninitialized in this function [-Wmaybe-uninitialized] memcpy(opt->addr, addrp, len); ^ Cheers, Matthias signature.asc Description: OpenPGP digital signature ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Announce: dnsmasq-2.77rc4
Am 20.05.2017 um 22:50 schrieb Simon Kelley: > I've just mase the fourth, and probably final, release candidate for > dnsmasq-27. Please download, compile and run, and report any problems > ASAP. If all looks OK, 2.77 will happen in the next week. > > http://www.thekelleys.org.uk/dnsmasq/release-candidates/dnsmasq-2.77rc4.tar.gz Three issues during compilation on FreeBSD 10.3 amd64, which look like genuine bugs, and the forward.c seem critical - these should likely be "server->flags & SERV_DO_DNSSEC), with & not &&. > forward.c:902:60: warning: use of logical '&&' with constant operand > [-Wconstant-logical-operand] > > option_bool(OPT_DNSSEC_NO_SIGN) && (server->flags && SERV_DO_DNSSEC), > NULL, NULL); > > > ^ ~~ > forward.c:902:60: note: use '&' for a bitwise operation > > option_bool(OPT_DNSSEC_NO_SIGN) && (server->flags && SERV_DO_DNSSEC), > NULL, NULL); > > > ^~ > > > & > forward.c:902:60: note: remove constant to silence this warning > > option_bool(OPT_DNSSEC_NO_SIGN) && (server->flags && SERV_DO_DNSSEC), > NULL, NULL); > > > ~^ > forward.c:1480:59: warning: use of logical '&&' with constant operand > [-Wconstant-logical-operand] > > option_bool(OPT_DNSSEC_NO_SIGN) && (server->flags && SERV_DO_DNSSEC), > NULL, NULL); > > > ^ ~~ > forward.c:1480:59: note: use '&' for a bitwise operation > > option_bool(OPT_DNSSEC_NO_SIGN) && (server->flags && SERV_DO_DNSSEC), > NULL, NULL); > > > ^~ > > > & > forward.c:1480:59: note: remove constant to silence this warning > > option_bool(OPT_DNSSEC_NO_SIGN) && (server->flags && SERV_DO_DNSSEC), > NULL, NULL); > > > ~^ > > rfc2131.c:839:25: warning: data argument not used by format string > [-Wformat-extra-args] >service->basename, layer); > ^ I think you may want to resolve these before 2.77 release time. And when trying to strip down the build disabling all options I expose in FreeBSD, I get these, which are cosmetic and, in the option.c case, are bloat. The attached patch series (against Git master) fixes these. Use git am to apply them in given order, and carefully review 0003* whether the option_len() macro needs to be changed instead. > option.c:910:23: warning: unused function 'add_rev6' [-Wunused-function] > static struct server *add_rev6(struct in6_addr *addr, int msize) > ^ > > network.c:936:24: warning: unused variable 'l6' [-Wunused-variable] > struct listener *l, *l6; >^ You may consider resolving these before 2.77 with proper #ifdefs. I don't care much. From 3f0bf25228b5518d42a67a46ebdc4e3751df1d4a Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Sun, 21 May 2017 12:30:09 +0200 Subject: [PATCH 1/3] Use bit-wise &, not boolean &&... when checking if server->flags contains SERV_DO_DNSSEC. --- src/forward.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/forward.c b/src/forward.c index 93a2c86..83f392d 100644 --- a/src/forward.c +++ b/src/forward.c @@ -899,7 +899,7 @@ void reply_query(int fd, int family, time_t now) status = dnssec_validate_ds(now, header, n, daemon->namebuff, daemon->keyname, forward->class); else status = dnssec_validate_reply(now, header, n, daemon->namebuff, daemon->keyname, &forward->class, - option_bool(OPT_DNSSEC_NO_SIGN) && (server->flags && SERV_DO_DNSSEC), NULL, NULL); + option_bool(OPT_DNSSEC_NO_SIGN) && (server->flags & SERV_DO_DNSSEC), NULL, NULL); } /* Can't validate, as we're missing key data. Put this @@ -1477,7 +1477,7 @@ static int tcp_key_recurse(time_t now, int status, struct dns_header *header, si new_status = dnssec_validate_ds(now, header, n, name, keyname, class); else new_status = dnssec_validate_reply(now, header, n, name, keyname, &class, - option_bool(OPT_DNSSEC_NO_SIGN) && (server->flags && S