Created attachment 223913 [details] dns___nsd.log Hello, Trying to build the latest NSD 4.3.6 under 12.2-RELEASE-p2 with Synth and it fails with the error(s) below. The full log file is attached. Thank you. --- server.o --- ./server.c:861:36: warning: unused parameter 'sock' [-Wunused-parameter] set_ipv6_v6only(struct nsd_socket *sock) ^ ./server.c:2867:17: warning: incompatible pointer types passing 'struct sockaddr_storage *' to parameter of type 'struct sockaddr_in *' [-Wincompatible-pointer-types] addrport2str((struct sockaddr_storage*)&sock->addr.ai_addr, buf, sizeof(buf)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./util.h:424:22: note: passing argument to parameter 'addr' here struct sockaddr_in *addr ^ ./server.c:3343:33: warning: incompatible pointer types passing 'struct sockaddr_storage *' to parameter of type 'struct sockaddr_in *' [-Wincompatible-pointer-types] log_addr("to server (local)", &data->socket->addr.ai_addr, data->socket->addr.ai_family); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ./server.c:100:22: note: passing argument to parameter 'addr' here struct sockaddr_in* addr, ^ ./server.c:3344:45: warning: incompatible pointer types passing 'struct sockaddr_storage *' to parameter of type 'struct sockaddr_in *' [-Wincompatible-pointer-types] dt_collector_submit_auth_query(data->nsd, &data->socket->addr.ai_addr, &q->addr, q->addrlen, ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ./dnstap/dnstap_collector.h:76:22: note: passing argument to parameter 'local_addr' here struct sockaddr_in* local_addr, ^ ./server.c:3381:36: warning: incompatible pointer types passing 'struct sockaddr_storage *' to parameter of type 'struct sockaddr_in *' [-Wincompatible-pointer-types] log_addr("from server (local)", &data->socket->addr.ai_addr, data->socket->addr.ai_family); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ./server.c:100:22: note: passing argument to parameter 'addr' here struct sockaddr_in* addr, ^ ./server.c:3383:49: warning: incompatible pointer types passing 'struct sockaddr_storage *' to parameter of type 'struct sockaddr_in *' [-Wincompatible-pointer-types] dt_collector_submit_auth_response(data->nsd, &data->socket->addr.ai_addr, ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ./dnstap/dnstap_collector.h:90:22: note: passing argument to parameter 'local_addr' here struct sockaddr_in* local_addr, ^ ./server.c:3688:70: error: no member named 'ss_family' in 'struct sockaddr_in'; did you mean 'sin_family'? log_addr("query from client", &data->query->addr, data->query->addr.ss_family); ^~~~~~~~~ sin_family /usr/include/netinet/in.h:99:14: note: 'sin_family' declared here sa_family_t sin_family; ^ ./server.c:3689:79: error: no member named 'ss_family' in 'struct sockaddr_in'; did you mean 'sin_family'? log_addr("to server (local)", &data->socket->addr.ai_addr, data->query->addr.ss_family); ^~~~~~~~~ sin_family /usr/include/netinet/in.h:99:14: note: 'sin_family' declared here sa_family_t sin_family; ^ ./server.c:3690:44: warning: incompatible pointer types passing 'struct sockaddr_storage *' to parameter of type 'struct sockaddr_in *' [-Wincompatible-pointer-types] dt_collector_submit_auth_query(data->nsd, &data->socket->addr.ai_addr, &data->query->addr, ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ./dnstap/dnstap_collector.h:76:22: note: passing argument to parameter 'local_addr' here struct sockaddr_in* local_addr, ^ ./server.c:3741:81: error: no member named 'ss_family' in 'struct sockaddr_in'; did you mean 'sin_family'? log_addr("from server (local)", &data->socket->addr.ai_addr, data->query->addr.ss_family); ^~~~~~~~~ sin_family /usr/include/netinet/in.h:99:14: note: 'sin_family' declared here sa_family_t sin_family; ^ ./server.c:3742:71: error: no member named 'ss_family' in 'struct sockaddr_in'; did you mean 'sin_family'? log_addr("response to client", &data->query->addr, data->query->addr.ss_family); ^~~~~~~~~ sin_family /usr/include/netinet/in.h:99:14: note: 'sin_family' declared here sa_family_t sin_family; ^ ./server.c:3743:47: warning: incompatible pointer types passing 'struct sockaddr_storage *' to parameter of type 'struct sockaddr_in *' [-Wincompatible-pointer-types] dt_collector_submit_auth_response(data->nsd, &data->socket->addr.ai_addr, &data->query->addr, ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ./dnstap/dnstap_collector.h:90:22: note: passing argument to parameter 'local_addr' here struct sockaddr_in* local_addr, ^ ./server.c:4176:70: error: no member named 'ss_family' in 'struct sockaddr_in'; did you mean 'sin_family'? log_addr("query from client", &data->query->addr, data->query->addr.ss_family); ^~~~~~~~~ sin_family /usr/include/netinet/in.h:99:14: note: 'sin_family' declared here sa_family_t sin_family; ^ ./server.c:4177:79: error: no member named 'ss_family' in 'struct sockaddr_in'; did you mean 'sin_family'? log_addr("to server (local)", &data->socket->addr.ai_addr, data->query->addr.ss_family); ^~~~~~~~~ sin_family /usr/include/netinet/in.h:99:14: note: 'sin_family' declared here sa_family_t sin_family; ^ ./server.c:4178:44: warning: incompatible pointer types passing 'struct sockaddr_storage *' to parameter of type 'struct sockaddr_in *' [-Wincompatible-pointer-types] dt_collector_submit_auth_query(data->nsd, &data->socket->addr.ai_addr, &data->query->addr, ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ./dnstap/dnstap_collector.h:76:22: note: passing argument to parameter 'local_addr' here struct sockaddr_in* local_addr, ^ ./server.c:4229:81: error: no member named 'ss_family' in 'struct sockaddr_in'; did you mean 'sin_family'? log_addr("from server (local)", &data->socket->addr.ai_addr, data->query->addr.ss_family); ^~~~~~~~~ sin_family /usr/include/netinet/in.h:99:14: note: 'sin_family' declared here sa_family_t sin_family; ^ ./server.c:4230:71: error: no member named 'ss_family' in 'struct sockaddr_in'; did you mean 'sin_family'? log_addr("response to client", &data->query->addr, data->query->addr.ss_family); ^~~~~~~~~ sin_family /usr/include/netinet/in.h:99:14: note: 'sin_family' declared here sa_family_t sin_family; ^ ./server.c:4231:47: warning: incompatible pointer types passing 'struct sockaddr_storage *' to parameter of type 'struct sockaddr_in *' [-Wincompatible-pointer-types] dt_collector_submit_auth_response(data->nsd, &data->socket->addr.ai_addr, &data->query->addr, ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ./dnstap/dnstap_collector.h:90:22: note: passing argument to parameter 'local_addr' here struct sockaddr_in* local_addr, ^ 10 warnings and 8 errors generated. *** [server.o] Error code 1 make[1]: stopped in /construction/xports/dns/nsd/work/nsd-4.3.6 --- nsd.o --- ./nsd.c:263:6: warning: unused variable 'r' [-Wunused-variable] int r; ^ ./nsd.c:554:16: warning: incompatible pointer types passing 'struct sockaddr_storage *' to parameter of type 'struct sockaddr_in *' [-Wincompatible-pointer-types] addrport2str(&udp[i].addr.ai_addr, sockbuf, sizeof(sockbuf)); ^~~~~~~~~~~~~~~~~~~~ ./util.h:424:22: note: passing argument to parameter 'addr' here struct sockaddr_in *addr ^ ./nsd.c:559:16: warning: incompatible pointer types passing 'struct sockaddr_storage *' to parameter of type 'struct sockaddr_in *' [-Wincompatible-pointer-types] addrport2str(&tcp[i].addr.ai_addr, sockbuf, sizeof(sockbuf)); ^~~~~~~~~~~~~~~~~~~~ ./util.h:424:22: note: passing argument to parameter 'addr' here struct sockaddr_in *addr ^ 3 warnings generated. 1 error make[1]: stopped in /construction/xports/dns/nsd/work/nsd-4.3.6 ===> Compilation failed unexpectedly. Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. *** Error code 1 Stop. make: stopped in /xports/dns/nsd
The problems seems to be triggered by the combinations of DNSTAP=on: Enable dnstap logging support IPV6=off: IPv6 protocol support The work around to set IPV6=ON and when you don't have IPv6, disable the option in nsd.conf. From the manual: do-ip6: <yes or no> If yes, NSD listens to IPv6 connections. Default yes. Meanwhile, I'll warn the upstream
Thank you -- the workaround worked.
Created attachment 224355 [details] patch to fix problem The upstream fixed it: https://github.com/NLnetLabs/nsd/issues/170 and I created a path (attached). [Meta comment: first time using the git ports tree for this, so hop things are will work out]
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=3ee20c7c2c7d3fe14b1b7565036a8f1405fea7b8 commit 3ee20c7c2c7d3fe14b1b7565036a8f1405fea7b8 Author: Jaap Akkerhuis <jaap@NLnetLabs.nl> AuthorDate: 2021-04-23 06:57:29 +0000 Commit: Kevin Bowling <kbowling@FreeBSD.org> CommitDate: 2021-04-23 06:59:11 +0000 dns/nsd: Fix build without IPv6 PR: 254874 Reported by: r00t@kaba1ah.org Tested by: r00t@kaba1ah.org dns/nsd/Makefile | 1 + dns/nsd/files/patch-nsd.c (new) | 33 ++++++++ dns/nsd/files/patch-server.c (new) | 167 +++++++++++++++++++++++++++++++++++++ 3 files changed, 201 insertions(+)
Thanks for your contribution!