diff --git a/ChangeLog b/ChangeLog index 745632d9..68763db7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -* 2018-02-??: Version 1.4.0 +* 2018-02-21: Version 1.4.0 * .so revision bump to please fedora packaging system. Thanks Paul Wouters * Specify the supported curves with getdns_context_set_tls_curves_list() diff --git a/configure.ac b/configure.ac index 221df401..07445b82 100644 --- a/configure.ac +++ b/configure.ac @@ -52,7 +52,7 @@ AC_SUBST([runstatedir], [$with_piddir]) # Dont forget to put a dash in front of the release candidate!!! # That is how it is done with semantic versioning! # -AC_SUBST(RELEASE_CANDIDATE, [-rc1]) +AC_SUBST(RELEASE_CANDIDATE, []) # Set current date from system if not set AC_ARG_WITH([current-date], @@ -62,7 +62,7 @@ AC_ARG_WITH([current-date], [CURRENT_DATE="`date -u +%Y-%m-%dT%H:%M:%SZ`"]) AC_SUBST(GETDNS_VERSION, ["AC_PACKAGE_VERSION$RELEASE_CANDIDATE"]) -AC_SUBST(GETDNS_NUMERIC_VERSION, [0x0103c100]) +AC_SUBST(GETDNS_NUMERIC_VERSION, [0x01040000]) AC_SUBST(API_VERSION, ["December 2015"]) AC_SUBST(API_NUMERIC_VERSION, [0x07df0c00]) GETDNS_COMPILATION_COMMENT="AC_PACKAGE_NAME $GETDNS_VERSION configured on $CURRENT_DATE for the $API_VERSION version of the API" @@ -102,7 +102,7 @@ AC_DEFINE_UNQUOTED([STUBBY_PACKAGE_STRING], ["0.2.2$RELEASE_CANDIDATE"], [Stubby # getdns-1.2.0 had libversion 8:0:2 # getdns-1.2.1 had libversion 8:1:2 # getdns-1.3.0 had libversion 9:0:3 -# getdns-1.4.0 will have libversion 10:0:0 +# getdns-1.4.0 has libversion 10:0:0 # GETDNS_LIBVERSION=10:0:0 diff --git a/src/Makefile.in b/src/Makefile.in index a7cc9ea4..1059afca 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -207,10 +207,10 @@ getdns_server_mon: default cd tools && $(MAKE) $@ stubby.1: $(stubbysrcdir)/doc/stubby.1.in - sed -e "s|@ETCDIR@|$(stubbyconfdir)|g" $< > $@ + sed -e "s|@ETCDIR@|$(stubbyconfdir)|g" $(stubbysrcdir)/doc/stubby.1.in > $@ stubby.lo: $(stubbysrcdir)/src/stubby.c - $(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) $(WPEDANTICFLAG) -DSTUBBYCONFDIR=\"$(sysconfdir)/stubby\" -DRUNSTATEDIR=\"$(runstatedir)\" -c $< -o $@ + $(LIBTOOL) --quiet --tag=CC --mode=compile $(CC) $(CFLAGS) $(WPEDANTICFLAG) -DSTUBBYCONFDIR=\"$(sysconfdir)/stubby\" -DRUNSTATEDIR=\"$(runstatedir)\" -c $(stubbysrcdir)/src/stubby.c -o $@ stubby: stubby.lo libgetdns.la $(STUBBY_XTRA_OBJS) $(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ stubby.lo $(STUBBY_XTRA_OBJS) $(STUBBY_LDFLAGS) libgetdns.la diff --git a/src/test/tpkg/275-server-capabilities.tpkg/275-server-capabilities.c b/src/test/tpkg/275-server-capabilities.tpkg/275-server-capabilities.c index 91756bf6..3e817834 100644 --- a/src/test/tpkg/275-server-capabilities.tpkg/275-server-capabilities.c +++ b/src/test/tpkg/275-server-capabilities.tpkg/275-server-capabilities.c @@ -83,7 +83,7 @@ void handler(getdns_context *context, getdns_callback_type_t callback_type, exit(EXIT_FAILURE); } -int main() +int main(int argc, char **argv) { getdns_context *context = NULL; getdns_list *listeners = NULL; @@ -92,9 +92,20 @@ int main() uint32_t port1 = 18000; uint32_t port2 = 18000; getdns_return_t r; + char listenliststr[1024]; + char listendictstr[1024]; - if ((r = getdns_str2list("[ 127.0.0.1:18000 ]", &listeners)) || - (r = getdns_str2dict("127.0.0.1:18000", &address2)) || + if (argc != 2) { + fprintf(stderr, "usage: %s \n", argv[0]); + return 1; + } + (void) snprintf(listenliststr, sizeof(listenliststr), + "[ %s:18000 ]", argv[1]); + (void) snprintf(listendictstr, sizeof(listendictstr), + "%s:18000", argv[1]); + + if ((r = getdns_str2list(listenliststr, &listeners)) || + (r = getdns_str2dict(listendictstr, &address2)) || (r = getdns_list_get_dict(listeners, 0, &address)) || (r = getdns_context_create(&context, 0))) fprintf(stderr, "Error initializing: "); diff --git a/src/test/tpkg/275-server-capabilities.tpkg/275-server-capabilities.test b/src/test/tpkg/275-server-capabilities.tpkg/275-server-capabilities.test index 9935de91..2b144cf7 100644 --- a/src/test/tpkg/275-server-capabilities.tpkg/275-server-capabilities.test +++ b/src/test/tpkg/275-server-capabilities.tpkg/275-server-capabilities.test @@ -4,18 +4,22 @@ # use .tpkg.var.test for in test variable passing [ -f .tpkg.var.test ] && source .tpkg.var.test +LOCALHOST=`${GETDNS_STUB_QUERY} '{namespaces:[GETDNS_NAMESPACE_LOCALNAMES]}' -A localhost. -J \ + | awk -F: '/\"address_data\".*\"127/{print $2}' \ + | sed -e 's/^[^"]*"//g' -e 's/"[^"]*$//g'` +echo "localhost: $LOCALHOST" -make && "${BUILDDIR}/build-stub-only/libtool" exec valgrind -v --log-file=valgrind.log --leak-check=full --error-exitcode=1 --track-origins=yes "./${TPKG_NAME}" | ( +make && "${BUILDDIR}/build-stub-only/libtool" exec valgrind -v --log-file=valgrind.log --leak-check=full --error-exitcode=1 --track-origins=yes "./${TPKG_NAME}" ${LOCALHOST} | ( read PORT read PORT2 - ${GETDNS_STUB_QUERY} -s -t 1000 @127.0.0.1:$PORT TXT cancel. +return_call_reporting 2>&1 > time_out + ${GETDNS_STUB_QUERY} -s -t 1000 @${LOCALHOST}:$PORT TXT cancel. +return_call_reporting 2>&1 > time_out - ${GETDNS_STUB_QUERY} -s @127.0.0.1:$PORT TXT test +return_call_reporting 2>&1 > tcp_out + ${GETDNS_STUB_QUERY} -s @${LOCALHOST}:$PORT TXT test +return_call_reporting 2>&1 > tcp_out - ${GETDNS_STUB_QUERY} -s -U @127.0.0.1:$PORT2 TXT test +return_call_reporting 2>&1 > udp_out + ${GETDNS_STUB_QUERY} -s -U @${LOCALHOST}:$PORT2 TXT test +return_call_reporting 2>&1 > udp_out - ${GETDNS_STUB_QUERY} -s -q @127.0.0.1:$PORT TXT quit. + ${GETDNS_STUB_QUERY} -s -q @${LOCALHOST}:$PORT TXT quit. ) if grep -q 'definitely lost: [^0]' valgrind.log then diff --git a/src/test/tpkg/280-limit_outstanding_queries.tpkg/280-limit_outstanding_queries.c b/src/test/tpkg/280-limit_outstanding_queries.tpkg/280-limit_outstanding_queries.c index 1467ec34..8337caf4 100644 --- a/src/test/tpkg/280-limit_outstanding_queries.tpkg/280-limit_outstanding_queries.c +++ b/src/test/tpkg/280-limit_outstanding_queries.tpkg/280-limit_outstanding_queries.c @@ -107,15 +107,23 @@ void handler(getdns_context *context, getdns_callback_type_t callback_type, exit(EXIT_FAILURE); } -int main() +int main(int argc, char **argv) { getdns_context *context = NULL; getdns_list *listeners = NULL; getdns_dict *address = NULL; uint32_t port = 18000; getdns_return_t r; + char listenliststr[1024]; - if ((r = getdns_str2list("[ 127.0.0.1:18000 ]", &listeners)) || + if (argc != 2) { + fprintf(stderr, "usage: %s \n", argv[0]); + return 1; + } + (void) snprintf(listenliststr, sizeof(listenliststr), + "[ %s:18000 ]", argv[1]); + + if ((r = getdns_str2list(listenliststr, &listeners)) || (r = getdns_list_get_dict(listeners, 0, &address)) || (r = getdns_context_create(&context, 0))) fprintf(stderr, "Error initializing: "); diff --git a/src/test/tpkg/280-limit_outstanding_queries.tpkg/280-limit_outstanding_queries.test b/src/test/tpkg/280-limit_outstanding_queries.tpkg/280-limit_outstanding_queries.test index 177cc1c7..e22456c3 100644 --- a/src/test/tpkg/280-limit_outstanding_queries.tpkg/280-limit_outstanding_queries.test +++ b/src/test/tpkg/280-limit_outstanding_queries.tpkg/280-limit_outstanding_queries.test @@ -5,21 +5,27 @@ [ -f .tpkg.var.test ] && source .tpkg.var.test +LOCALHOST=`${GETDNS_STUB_QUERY} '{namespaces:[GETDNS_NAMESPACE_LOCALNAMES]}' -A localhost. -J \ + | awk -F: '/\"address_data\".*\"127/{print $2}' \ + | sed -e 's/^[^"]*"//g' -e 's/"[^"]*$//g'` +echo "localhost: $LOCALHOST" + QLIMIT=64 -NQUERIES=`wc "./${TPKG_NAME}.queries"|sed 's/ .*$//g'` +NQUERIES=`wc "./${TPKG_NAME}.queries"|sed -e 's/^ *//g' -e 's/ .*$//g'` +echo "# queries: $NQUERIES" # Test will take NQUERIES / QLIMIT * answer delay # For current parameters this is 1000 / 64 * 0.3 = 4.6875 # which is smaller than 5 seconds default query timeout value, # so the test should succeed. -make && "./${TPKG_NAME}" | ( +make && "./${TPKG_NAME}" ${LOCALHOST} | ( read PORT - ${GETDNS_STUB_QUERY} @127.0.0.1:$PORT TXT \ + ${GETDNS_STUB_QUERY} @${LOCALHOST}:$PORT TXT \ -a -F "./${TPKG_NAME}.queries" \ "{limit_outstanding_queries:$QLIMIT}" 2>&1 > out - ${GETDNS_STUB_QUERY} -q @127.0.0.1:$PORT TXT quit. + ${GETDNS_STUB_QUERY} -q @${LOCALHOST}:$PORT TXT quit. ) && grep '"n_requests: [0-9][0-9]*"' out | sed -e 's/^.*n_requests: //g' -e 's/".*$//g' \ | awk -vQLIMIT=$QLIMIT -vNQUERIES=$NQUERIES ' diff --git a/src/test/tpkg/285-out_of_filedescriptors.tpkg/285-out_of_filedescriptors.c b/src/test/tpkg/285-out_of_filedescriptors.tpkg/285-out_of_filedescriptors.c index e495466d..88ecaf20 100644 --- a/src/test/tpkg/285-out_of_filedescriptors.tpkg/285-out_of_filedescriptors.c +++ b/src/test/tpkg/285-out_of_filedescriptors.tpkg/285-out_of_filedescriptors.c @@ -112,15 +112,23 @@ void handler(getdns_context *context, getdns_callback_type_t callback_type, exit(EXIT_FAILURE); } -int main() +int main(int argc, char **argv) { getdns_context *context = NULL; getdns_list *listeners = NULL; getdns_dict *address = NULL; uint32_t port = 18000; getdns_return_t r; + char listenliststr[1024]; - if ((r = getdns_str2list("[ 127.0.0.1:18000 ]", &listeners)) || + if (argc != 2) { + fprintf(stderr, "usage: %s \n", argv[0]); + return 1; + } + (void) snprintf(listenliststr, sizeof(listenliststr), + "[ %s:18000 ]", argv[1]); + + if ((r = getdns_str2list(listenliststr, &listeners)) || (r = getdns_list_get_dict(listeners, 0, &address)) || (r = getdns_context_create(&context, 0))) fprintf(stderr, "Error initializing: "); diff --git a/src/test/tpkg/285-out_of_filedescriptors.tpkg/285-out_of_filedescriptors.test b/src/test/tpkg/285-out_of_filedescriptors.tpkg/285-out_of_filedescriptors.test index 64a53cfb..6eeb53d1 100644 --- a/src/test/tpkg/285-out_of_filedescriptors.tpkg/285-out_of_filedescriptors.test +++ b/src/test/tpkg/285-out_of_filedescriptors.tpkg/285-out_of_filedescriptors.test @@ -5,8 +5,14 @@ [ -f .tpkg.var.test ] && source .tpkg.var.test +LOCALHOST=`${GETDNS_STUB_QUERY} '{namespaces:[GETDNS_NAMESPACE_LOCALNAMES]}' -A localhost. -J \ + | awk -F: '/\"address_data\".*\"127/{print $2}' \ + | sed -e 's/^[^"]*"//g' -e 's/"[^"]*$//g'` +echo "localhost: $LOCALHOST" + QLIMIT=79 -NQUERIES=`wc "./${TPKG_NAME}.queries"|sed 's/ .*$//g'` +NQUERIES=`wc "./${TPKG_NAME}.queries"|sed -e 's/^ *//g' -e 's/ .*$//g'` +echo "# queries: $NQUERIES" # This time the query limit is set by setting the maximum open # filedescriptors. We seem to be needing a higher QLIMIT, than @@ -21,13 +27,13 @@ NQUERIES=`wc "./${TPKG_NAME}.queries"|sed 's/ .*$//g'` # which is smaller than 5 seconds default query timeout value, # so the test should succeed. -make && "./${TPKG_NAME}" | ( +make && "./${TPKG_NAME}" ${LOCALHOST}| ( read PORT ulimit -n $QLIMIT - ${GETDNS_STUB_QUERY} @127.0.0.1:$PORT TXT \ + ${GETDNS_STUB_QUERY} @${LOCALHOST}:$PORT TXT \ -a -F "./${TPKG_NAME}.queries" 2>&1 > out - ${GETDNS_STUB_QUERY} -q @127.0.0.1:$PORT TXT quit. + ${GETDNS_STUB_QUERY} -q @${LOCALHOST}:$PORT TXT quit. ) && grep '"n_requests: [0-9][0-9]*"' out | sed -e 's/^.*n_requests: //g' -e 's/".*$//g' \ | awk -vQLIMIT=$QLIMIT -vNQUERIES=$NQUERIES ' diff --git a/stubby b/stubby index 9657d0e4..1a6acd64 160000 --- a/stubby +++ b/stubby @@ -1 +1 @@ -Subproject commit 9657d0e492e0a459d8d0ee301cf1604ed6895bd3 +Subproject commit 1a6acd642c7dc9a04cf092e1a3837c5636d4b465