Re: [Dnsmasq-discuss] Announce: dnsmasq-2.81rc1
On 04/03/2020 22:29, Matthias Andree wrote: > Am 02.03.20 um 23:39 schrieb Simon Kelley: >> It's almost 18 months since the last release of dnsmasq, which is far >> too long. >> >> I've done my best over the last couple of weeks to tie up loose-ends, so >> that a 2.81 release can happen. There are ongoing development efforts, >> but they may have to wait for the 2.82 release, which I intend to be >> much sooner after 2.81. >> >> So, I've just tagged 2.81rc1, get it from git, or at >> >> http://www.thekelleys.org.uk/dnsmasq/release-candidates/dnsmasq-2.81rc1.tar.gz >> >> and let me know 1) if there are any showstopping bugs. or 2) there are >> are any loose ends I missed. >> >> Once those, if any, are dealt with, we shall have a new release! > > Simon, > > good to see progress towards a new release. > > Unfortunately, dnsmasq 2.81rc1 doesn't compile under FreeBSD OOTB, and I > don't have much time to investigate run-time behaviour, so I hope the > info below helps. The patches I use are at > https://svnweb.freebsd.org/ports/head/dns/dnsmasq-devel/files, but the > warning issue at the end of this email isn't fixed by them. > > The SOL_TCP is non-portable and it also contradicts POSIX and Linux > manpages, - unless we use SOL_SOCKET, we're supposed to use > getprotoent(3) to get the magic number for "TCP level", whereas POSIX > suggests to use IPPROTO_TCP. > > Best read these error messages with a __fixed-width__ font. > >> gmake[3]: Entering directory >> '/usr/ports.svn/dns/dnsmasq-devel/work/dnsmasq-2.81rc1/src' >> cc -O2 -pipe -Wall -Wno-unused-value -Wno-unused-parameter >> -Wno-unused-variable -Wno-unused-function -DHAVE_LIBIDN2 -DHAVE_DBUS >> -DHAVE_LUASCRIPT -DHAVE_DNSSEC -I/usr/local/include -DLIBICONV_PLUG >> -fstack-protector-strong -fno-strict-aliasing -O2 -pipe -Wall >> -Wno-unused-value -Wno-unused-parameter -Wno-unused-variable >> -Wno-unused-function -DHAVE_LIBIDN2 -DHAVE_DBUS -DHAVE_LUASCRIPT >> -DHAVE_DNSSEC -I/usr/local/include -DLIBICONV_PLUG >> -fstack-protector-strong -fno-strict-aliasing >> -DLOCALEDIR='"/usr/local/share/locale"' -DVERSION='"2.81rc1"' >> -I/usr/local/include/dbus-1.0 -I/usr/local/lib/dbus-1.0/include >> -I/usr/local/include -I/usr/local/include -I/usr/local/include >> -I/usr/local/include/dbus-1.0 -I/usr/local/lib/dbus-1.0/include >> -I/usr/local/include/lua52 -DLIBICONV_PLUG -c network.c >> network.c:731:22: error: use of undeclared identifier 'SOL_TCP' >> setsockopt(fd, SOL_TCP, TCP_FASTOPEN, &qlen, sizeof(qlen)); >> ^ >> 1 error generated. >> gmake[3]: *** >> [/usr/ports.svn/dns/dnsmasq-devel/work/dnsmasq-2.81rc1/Makefile:161: >> network.o] Error 1 > Thanks, I applied your patch verbatim. > The other things appears to be an improper reference, config->addr6 > appears to be the union and not its member. First clang: > >> cc -O2 -pipe -Wall -Wno-unused-value -Wno-unused-parameter >> -Wno-unused-variable -Wno-unused-function -DHAVE_LIBIDN2 -DHAVE_DBUS >> -DHAVE_LUASCRIPT -DHAVE_DNSSEC -I/usr/local/include -DLIBICONV_PLUG >> -fstack-protector-strong -fno-strict-aliasing -O2 -pipe -Wall >> -Wno-unused-value -Wno-unused-parameter -Wno-unused-variable >> -Wno-unused-function -DHAVE_LIBIDN2 -DHAVE_DBUS -DHAVE_LUASCRIPT >> -DHAVE_DNSSEC -I/usr/local/include -DLIBICONV_PLUG >> -fstack-protector-strong -fno-strict-aliasing >> -DLOCALEDIR='"/usr/local/share/locale"' -DVERSION='"2.81rc1"' >> -I/usr/local/include/dbus-1.0 -I/usr/local/lib/dbus-1.0/include >> -I/usr/local/include -I/usr/local/include -I/usr/local/include >> -I/usr/local/include/dbus-1.0 -I/usr/local/lib/dbus-1.0/include >> -I/usr/local/include/lua52 -DLIBICONV_PLUG -c rfc3315.c >> rfc3315.c:1193:44: error: member reference base type 'struct addrlist >> *' is not a structure or union >> if (have_config(config, CONFIG_ADDR6) && >> IN6_ARE_ADDR_EQUAL(&config->addr6, &addr)) >> >> ^ >> /usr/include/netinet6/in6.h:232:17: note: expanded from macro >> 'IN6_ARE_ADDR_EQUAL' >> (memcmp(&(a)->s6_addr[0], &(b)->s6_addr[0], sizeof(struct >> in6_addr)) == 0) >> ~~~^ ~~~ >> 1 error generated. > GCC words the error differently: > >> rfc3315.c: In function 'dhcp6_no_relay': >> rfc3315.c:1193:44: error: 'config->addr6' is a pointer; did you mean >> to use '->'? >> 1193 | if (have_config(config, CONFIG_ADDR6) && >> IN6_ARE_ADDR_EQUAL(&config->addr6, &addr)) >> | ^~ > > here, you have > > struct dhcp_config *config; > > struct dhcp_config { > //... > struct addrlist *addr6; > //... > } > > struct addrlist { > union all_addr addr; > // ... > struct addrlist *next; > } > > union all_addr { > //... > struct in6_addr addr6; > // ... > } > > So I guess this should be > /* ... */ && IN6_ARE_ADDR_EQUAL(&config->addr6->addr.addr6, &addr)) // > at least,
Re: [Dnsmasq-discuss] Announce: dnsmasq-2.81rc1
Am 02.03.20 um 23:39 schrieb Simon Kelley: > It's almost 18 months since the last release of dnsmasq, which is far > too long. > > I've done my best over the last couple of weeks to tie up loose-ends, so > that a 2.81 release can happen. There are ongoing development efforts, > but they may have to wait for the 2.82 release, which I intend to be > much sooner after 2.81. > > So, I've just tagged 2.81rc1, get it from git, or at > > http://www.thekelleys.org.uk/dnsmasq/release-candidates/dnsmasq-2.81rc1.tar.gz > > and let me know 1) if there are any showstopping bugs. or 2) there are > are any loose ends I missed. > > Once those, if any, are dealt with, we shall have a new release! Simon, good to see progress towards a new release. Unfortunately, dnsmasq 2.81rc1 doesn't compile under FreeBSD OOTB, and I don't have much time to investigate run-time behaviour, so I hope the info below helps. The patches I use are at https://svnweb.freebsd.org/ports/head/dns/dnsmasq-devel/files, but the warning issue at the end of this email isn't fixed by them. The SOL_TCP is non-portable and it also contradicts POSIX and Linux manpages, - unless we use SOL_SOCKET, we're supposed to use getprotoent(3) to get the magic number for "TCP level", whereas POSIX suggests to use IPPROTO_TCP. Best read these error messages with a __fixed-width__ font. > gmake[3]: Entering directory > '/usr/ports.svn/dns/dnsmasq-devel/work/dnsmasq-2.81rc1/src' > cc -O2 -pipe -Wall -Wno-unused-value -Wno-unused-parameter > -Wno-unused-variable -Wno-unused-function -DHAVE_LIBIDN2 -DHAVE_DBUS > -DHAVE_LUASCRIPT -DHAVE_DNSSEC -I/usr/local/include -DLIBICONV_PLUG > -fstack-protector-strong -fno-strict-aliasing -O2 -pipe -Wall > -Wno-unused-value -Wno-unused-parameter -Wno-unused-variable > -Wno-unused-function -DHAVE_LIBIDN2 -DHAVE_DBUS -DHAVE_LUASCRIPT > -DHAVE_DNSSEC -I/usr/local/include -DLIBICONV_PLUG > -fstack-protector-strong -fno-strict-aliasing > -DLOCALEDIR='"/usr/local/share/locale"' -DVERSION='"2.81rc1"' > -I/usr/local/include/dbus-1.0 -I/usr/local/lib/dbus-1.0/include > -I/usr/local/include -I/usr/local/include -I/usr/local/include > -I/usr/local/include/dbus-1.0 -I/usr/local/lib/dbus-1.0/include > -I/usr/local/include/lua52 -DLIBICONV_PLUG -c network.c > network.c:731:22: error: use of undeclared identifier 'SOL_TCP' > setsockopt(fd, SOL_TCP, TCP_FASTOPEN, &qlen, sizeof(qlen)); > ^ > 1 error generated. > gmake[3]: *** > [/usr/ports.svn/dns/dnsmasq-devel/work/dnsmasq-2.81rc1/Makefile:161: > network.o] Error 1 The other things appears to be an improper reference, config->addr6 appears to be the union and not its member. First clang: > cc -O2 -pipe -Wall -Wno-unused-value -Wno-unused-parameter > -Wno-unused-variable -Wno-unused-function -DHAVE_LIBIDN2 -DHAVE_DBUS > -DHAVE_LUASCRIPT -DHAVE_DNSSEC -I/usr/local/include -DLIBICONV_PLUG > -fstack-protector-strong -fno-strict-aliasing -O2 -pipe -Wall > -Wno-unused-value -Wno-unused-parameter -Wno-unused-variable > -Wno-unused-function -DHAVE_LIBIDN2 -DHAVE_DBUS -DHAVE_LUASCRIPT > -DHAVE_DNSSEC -I/usr/local/include -DLIBICONV_PLUG > -fstack-protector-strong -fno-strict-aliasing > -DLOCALEDIR='"/usr/local/share/locale"' -DVERSION='"2.81rc1"' > -I/usr/local/include/dbus-1.0 -I/usr/local/lib/dbus-1.0/include > -I/usr/local/include -I/usr/local/include -I/usr/local/include > -I/usr/local/include/dbus-1.0 -I/usr/local/lib/dbus-1.0/include > -I/usr/local/include/lua52 -DLIBICONV_PLUG -c rfc3315.c > rfc3315.c:1193:44: error: member reference base type 'struct addrlist > *' is not a structure or union > if (have_config(config, CONFIG_ADDR6) && > IN6_ARE_ADDR_EQUAL(&config->addr6, &addr)) > > ^ > /usr/include/netinet6/in6.h:232:17: note: expanded from macro > 'IN6_ARE_ADDR_EQUAL' > (memcmp(&(a)->s6_addr[0], &(b)->s6_addr[0], sizeof(struct > in6_addr)) == 0) > ~~~^ ~~~ > 1 error generated. GCC words the error differently: > rfc3315.c: In function 'dhcp6_no_relay': > rfc3315.c:1193:44: error: 'config->addr6' is a pointer; did you mean > to use '->'? > 1193 | if (have_config(config, CONFIG_ADDR6) && > IN6_ARE_ADDR_EQUAL(&config->addr6, &addr)) > | ^~ here, you have struct dhcp_config *config; struct dhcp_config { //... struct addrlist *addr6; //... } struct addrlist { union all_addr addr; // ... struct addrlist *next; } union all_addr { //... struct in6_addr addr6; // ... } So I guess this should be /* ... */ && IN6_ARE_ADDR_EQUAL(&config->addr6->addr.addr6, &addr)) // at least, this compiles And finally there's a portability warning that I only get with clang, but not with GCC: > dump.c:136:18: warning: taking address of packed member 'ip6_src' of > class or structure 'ip6_hdr' may result in an unaligned pointer value > [-Waddr
Re: [Dnsmasq-discuss] Announce: dnsmasq-2.81rc1
> On 3 Mar 2020, at 06:31, Geert Stappers wrote: > > On Mon, Mar 02, 2020 at 10:39:26PM +, Simon Kelley wrote: >> It's almost 18 months since the last release of dnsmasq, which is far >> too long. >> >> I've done my best over the last couple of weeks to tie up loose-ends, so >> that a 2.81 release can happen. There are ongoing development efforts, >> but they may have to wait for the 2.82 release, which I intend to be >> much sooner after 2.81. >> >> So, I've just tagged 2.81rc1, get it from git, or at >> >> http://www.thekelleys.org.uk/dnsmasq/release-candidates/dnsmasq-2.81rc1.tar.gz >> >> and let me know 1) if there are any showstopping bugs. or 2) there are >> are any loose ends I missed. >> >> Once those, if any, are dealt with, we shall have a new release! > > In http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2020q1/013757.html > is > int count, new; > - struct dhcp_config *config, *candidate; > + struct dhcp_config *config, *candidate; > struct hwaddr_config *conf_addr; Not sure I understand the relevance Geert but as is common with these sort of non obvious replacements, there’s a ‘rogue’ white space at the end of the replaced line which is removed by its replacement. > Regards > Geert Stappers > (Thursday evening (UTC+1) more time for what should be in 2.81) > -- > Silence is hard to parse > > ___ > Dnsmasq-discuss mailing list > Dnsmasq-discuss@lists.thekelleys.org.uk > http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss Cheers, Kevin D-B gpg: 012C ACB2 28C6 C53E 9775 9123 B3A2 389B 9DE2 334A signature.asc Description: Message signed with OpenPGP ___ 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.81rc1
On Mon, Mar 02, 2020 at 10:39:26PM +, Simon Kelley wrote: > It's almost 18 months since the last release of dnsmasq, which is far > too long. > > I've done my best over the last couple of weeks to tie up loose-ends, so > that a 2.81 release can happen. There are ongoing development efforts, > but they may have to wait for the 2.82 release, which I intend to be > much sooner after 2.81. > > So, I've just tagged 2.81rc1, get it from git, or at > > http://www.thekelleys.org.uk/dnsmasq/release-candidates/dnsmasq-2.81rc1.tar.gz > > and let me know 1) if there are any showstopping bugs. or 2) there are > are any loose ends I missed. > > Once those, if any, are dealt with, we shall have a new release! In http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2020q1/013757.html is int count, new; - struct dhcp_config *config, *candidate; + struct dhcp_config *config, *candidate; struct hwaddr_config *conf_addr; Regards Geert Stappers (Thursday evening (UTC+1) more time for what should be in 2.81) -- Silence is hard to parse ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss