Re: [Dnsmasq-discuss] 2.60rc4 bug
On 29/02/12 23:29, Matthias Andree wrote: -BEGIN PGP SIGNED MESSAGE- Also, when building with clang, there are some more warnings about unused results in expressions. I haven't investigated these. If you want to discard results, cast to void (possibly inside some macro): rfc1035.c:322:9: warning: expression result unused [-Wunused-value] if (!ADD_RDLEN(header, ansp, plen, len)) ^~ rfc1035.c:28:42: note: expanded from: (!CHECK_LEN(header, pp, plen, len) ? 0 : (long)((pp) += (len)), 1) ^ I think this may be a genuine problem: does replacing the definition of ADD_RDLEN at the start of rfc1035.c with #define ADD_RDLEN(header, pp, plen, len) \ (!CHECK_LEN(header, pp, plen, len) ? 0 : ((long)((pp) += (len)), 1)) fix it? Cheers, Simon. ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] 2.60rc4 bug
On 29/02/12 23:29, Matthias Andree wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 29.02.2012 22:56, schrieb Preston Crow: Yup. RC4 is good with the ebuild. I would be surprised if the same issue didn't hit everyone building from source on Linux. I was just working on RC2 when I received this email, so good timing. I'd vote "HOLD YOUR HORSES" on RC4. There's a bug in radv.c line 67 (or rather line 57) in that you declare the wrong type for "len". You need socklen_t, but use size_t, which aren't synonyms (this is on FreeBSD 9-STABLE amd64 with clang - because it gives clearer error messages than gcc -, but I checked against POSIX 2008 and Ubuntu 11.04): I'm in no hurry to get to 2.60-final. There are no pressing problems with 2.59, and a lot of touched code on 2.60, so we'll take it slow and try and get it right. It's amazing how the bug-report rate has increased since rc1 though :-). I'll fix those problems for the next RC, Matthias. Thanks for that. A question: does the BSD network stack always fix the prefix length at exactly 64 bits? That's the "correct way" and as I can't find a way to read the prefix length from an interface in *BSD, I've assumed that it's always-and-forever 64. On Linux it's possible to set a longer prefix length on an interface and dnsmasq handles that. I know a subnet should be 64 bits, but one advantage of DHCPv6 is that you don't need 64 bit subnets for stateless addressing to work, and I foresee a lot of people getting /64s from an ISP and then subnetting them. Cheers, Simon. ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] 2.60rc4 bug
And in case anyone was wondering, I've had no issues with the fix for slow start times with a large hosts files with distinct IP addresses. In other words, all the release candidates have looked good with effectively instant start times. My test: /etc/init.d/dnsmasq restart ; host google.com I get a full and proper response on the hostname lookup, so the start time is faster than the shell overhead. Very nice. ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] 2.60rc4 bug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 01.03.2012 00:29, schrieb Matthias Andree: > Am 29.02.2012 22:56, schrieb Preston Crow: >> Yup. RC4 is good with the ebuild. I would be surprised if the same >> issue didn't hit everyone building from source on Linux. I was just >> working on RC2 when I received this email, so good timing. > > I'd vote "HOLD YOUR HORSES" on RC4. There's a bug in radv.c line 67 (or > rather line 57) in that you declare the wrong type for "len". You need > socklen_t, but use size_t, which aren't synonyms (this is on FreeBSD > 9-STABLE amd64 with clang - because it gives clearer error messages than > gcc -, but I checked against POSIX 2008 and Ubuntu 11.04): Sorry Preston, the "you" isn't directed at you personally, and I didn't mean to point naked fingers at dressed people as the German saying goes, but pinpoint the bug as precisely as I deem useful right before a release. No offense intended. Best regards Matthias -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk9OubIACgkQvmGDOQUufZVi3ACg6tHVfKNLskO9/njaFrY1rl7C vLoAn0RsBgBCKLQDmJAV/MSoAwAlgDOe =bcaz -END PGP SIGNATURE- ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] 2.60rc4 bug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 29.02.2012 22:56, schrieb Preston Crow: > Yup. RC4 is good with the ebuild. I would be surprised if the same > issue didn't hit everyone building from source on Linux. I was just > working on RC2 when I received this email, so good timing. I'd vote "HOLD YOUR HORSES" on RC4. There's a bug in radv.c line 67 (or rather line 57) in that you declare the wrong type for "len". You need socklen_t, but use size_t, which aren't synonyms (this is on FreeBSD 9-STABLE amd64 with clang - because it gives clearer error messages than gcc -, but I checked against POSIX 2008 and Ubuntu 11.04): - --- clang -O2 -pipe -fno-strict-aliasing - -DLOCALEDIR='"/tmp/dnsmasq-2.60.r4_1/share/locale"' - -DVERSION='"2.60rc4"' -I/usr/local/include-c radv.c radv.c:67:67: warning: incompatible pointer types passing 'size_t *' (aka 'unsigned long *') to parameter of type 'socklen_t *' (aka 'unsigned int *') [-Wincompatible-pointer-types] getsockopt(fd, IPPROTO_IPV6, IPV6_UNICAST_HOPS, &hop_limit, &len) || ^~~~ /usr/include/sys/socket.h:612:72: note: passing argument to parameter here int getsockopt(int, int, int, void * __restrict, socklen_t * __restrict); ^ - --- cc -O2 -pipe -fno-strict-aliasing - -DLOCALEDIR='"/tmp/dnsmasq-2.60.r4_1/share/locale"' - -DVERSION='"2.60rc4"' -I/usr/local/include-c radv.c radv.c: In function 'ra_init': radv.c:67: warning: passing argument 5 of 'getsockopt' from incompatible pointer type - --- SYNOPSIS #include #include int getsockopt(int s, int level, int optname, void * restrict optval, socklen_t * restrict optlen); ... - --- Also, when building with clang, there are some more warnings about unused results in expressions. I haven't investigated these. If you want to discard results, cast to void (possibly inside some macro): rfc1035.c:322:9: warning: expression result unused [-Wunused-value] if (!ADD_RDLEN(header, ansp, plen, len)) ^~ rfc1035.c:28:42: note: expanded from: (!CHECK_LEN(header, pp, plen, len) ? 0 : (long)((pp) += (len)), 1) ^ rfc1035.c:361:12: warning: expression result unused [-Wunused-value] if (!ADD_RDLEN(header, ansp, plen, rdlen)) ^~~~ rfc1035.c:28:42: note: expanded from: (!CHECK_LEN(header, pp, plen, len) ? 0 : (long)((pp) += (len)), 1) ^ rfc1035.c:494:12: warning: expression result unused [-Wunused-value] if (!ADD_RDLEN(header, ansp, plen, rdlen)) ^~~~ rfc1035.c:28:42: note: expanded from: (!CHECK_LEN(header, pp, plen, len) ? 0 : (long)((pp) += (len)), 1) ^ rfc1035.c:716:12: warning: expression result unused [-Wunused-value] if (!ADD_RDLEN(header, p, qlen, rdlen)) ^ rfc1035.c:28:42: note: expanded from: (!CHECK_LEN(header, pp, plen, len) ? 0 : (long)((pp) += (len)), 1) ^ rfc1035.c:763:17: warning: expression result unused [-Wunused-value] else if (!ADD_RDLEN(header, p, qlen, rdlen)) ^ rfc1035.c:28:42: note: expanded from: (!CHECK_LEN(header, pp, plen, len) ? 0 : (long)((pp) += (len)), 1) ^ rfc1035.c:1173:12: warning: expression result unused [-Wunused-value] if (!ADD_RDLEN(header, p, qlen, rdlen)) ^ rfc1035.c:28:42: note: expanded from: (!CHECK_LEN(header, pp, plen, len) ? 0 : (long)((pp) += (len)), 1) ^ It is probably safe to leave the unused-value warnings unfixed for 2.60, but the pointer size bug definitely needs fixing before the 2.60 release. Best regards Matthias -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk9OtMQACgkQvmGDOQUufZX/LQCZAVbeQcfJTbczo7rhwguZIXFW C5UAnjvT6B1ceRLh0FQnyf6ffA5XSe27 =qSBj -END PGP SIGNATURE- ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss