Compare commits

..

No commits in common. "develop" and "v1.7.1-rc.1" have entirely different histories.

13 changed files with 37 additions and 72 deletions

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.20 FATAL_ERROR) cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
if (POLICY CMP0075) if (POLICY CMP0075)
cmake_policy(SET CMP0075 NEW) cmake_policy(SET CMP0075 NEW)
@ -13,19 +13,19 @@ endif ()
set(PACKAGE "getdns") set(PACKAGE "getdns")
set(PACKAGE_NAME "getdns") set(PACKAGE_NAME "getdns")
set(PACKAGE_VERSION "1.7.3") set(PACKAGE_VERSION "1.7.1")
set(PACKAGE_BUGREPORT "team@getdnsapi.net") set(PACKAGE_BUGREPORT "team@getdnsapi.net")
set(PACKAGE_URL "https://getdnsapi.net") set(PACKAGE_URL "https://getdnsapi.net")
# Dont forget to put a dash in front of the release candidate!!! # Dont forget to put a dash in front of the release candidate!!!
# That is how it is done with semantic versioning! # That is how it is done with semantic versioning!
set(RELEASE_CANDIDATE "") set(RELEASE_CANDIDATE "-rc.1")
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}${RELEASE_CANDIDATE}") set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}${RELEASE_CANDIDATE}")
set(PACKAGE_TARNAME "${PACKAGE}-${PACKAGE_VERSION}${RELEASE_CANDIDATE}") set(PACKAGE_TARNAME "${PACKAGE}-${PACKAGE_VERSION}${RELEASE_CANDIDATE}")
set(GETDNS_VERSION "${PACKAGE_VERSION}${RELEASE_CANDIDATE}") set(GETDNS_VERSION "${PACKAGE_VERSION}${RELEASE_CANDIDATE}")
set(GETDNS_NUMERIC_VERSION 0x01070200) set(GETDNS_NUMERIC_VERSION 0x010700c1)
set(API_VERSION "December 2015") set(API_VERSION "December 2015")
set(API_NUMERIC_VERSION 0x07df0c00) set(API_NUMERIC_VERSION 0x07df0c00)
@ -262,7 +262,6 @@ check_include_file(inttypes.h HAVE_INTTYPES_H)
check_include_file(limits.h HAVE_LIMITS_H) check_include_file(limits.h HAVE_LIMITS_H)
check_include_file(sys/limits.h HAVE_SYS_LIMITS_H) check_include_file(sys/limits.h HAVE_SYS_LIMITS_H)
check_include_file(stdarg.h HAVE_STDARG_H) check_include_file(stdarg.h HAVE_STDARG_H)
check_include_file(stddef.h HAVE_STDDEF_H)
check_include_file(stdint.h HAVE_STDINT_H) check_include_file(stdint.h HAVE_STDINT_H)
check_include_file(stdio.h HAVE_STDIO_H) check_include_file(stdio.h HAVE_STDIO_H)
check_include_file(stdlib.h HAVE_STDLIB_H) check_include_file(stdlib.h HAVE_STDLIB_H)
@ -1061,8 +1060,6 @@ foreach (man ${mans})
endforeach() endforeach()
set(prefix ${CMAKE_INSTALL_PREFIX}) set(prefix ${CMAKE_INSTALL_PREFIX})
cmake_path(APPEND libdir_for_pc_file "\${prefix}" "${CMAKE_INSTALL_LIBDIR}")
cmake_path(APPEND includedir_for_pc_file "\${prefix}" "${CMAKE_INSTALL_INCLUDEDIR}")
configure_file(getdns.pc.in getdns.pc @ONLY) configure_file(getdns.pc.in getdns.pc @ONLY)
# Installing. # Installing.

View File

@ -1,33 +1,13 @@
* 2023-??-??: Version 1.7.4 * 2022-08-??: Version 1.7.1
* Issue #536: Broken trust anchor files are silently ignored
Thanks Stéphane Bortzmeyer
* 2022-12-22: Version 1.7.3
* PR #532: Increase CMake required version 3.5 -> 3.20, because we
need cmake_path for Absolute paths in pkg-config (See Issue #517)
Thanks Gabriel Ganne
* Updated to Stubby 0.4.3 quickfix release
* 2022-08-19: Version 1.7.2
* Updated to Stubby 0.4.2 quickfix release
* 2022-08-19: Version 1.7.1
* Always send the `dot` ALPN when using DoT * Always send the `dot` ALPN when using DoT
* Strengthen version determination for Libidn2 during cmake processing * Strengthen version determination for Libidn2 during cmake processing (thanks
(thanks jpbion). jpbion).
* Fix for issue in UDP stream selection in case of timeouts. * Fix for issue in UDP stream selection in case of timeouts.
Thanks Shikha Sharma Thanks Shikha Sharma
* Fix using asterisk in ipstr for any address. Thanks uzlonewolf. * Fix using asterisk in ipstr for any address. Thanks uzlonewolf.
* Issue stubby#295: rdata not correctly written for validation for * Issue stubby#295: rdata not correctly written for validation for certain
certain RR type. Also, set default built type to RelWithDebInfo and RR type. Also, set default built type to RelWithDebInfo and expose CFLAGS
expose CFLAGS via GETDNS_BUILD_CFLAGS define and via via GETDNS_BUILD_CFLAGS define and via getdns_context_get_api_information()
getdns_context_get_api_information()
* Issue #524: Bug fixes from submodules' upstream?
Thanks Johnnyslee
* Issue #517: Allow Absolute path CMAKE_INSTALL_{INCLUDE,LIB}DIR in
pkg-config files. Thanks Alex Shpilkin
* Issue #512: Update README.md to show correct PGP key location.
Thanks Katze Prior.
* 2021-06-04: Version 1.7.0 * 2021-06-04: Version 1.7.0
* Make TLS Handshake timeout max 4/5th of timeout for the query, * Make TLS Handshake timeout max 4/5th of timeout for the query,

View File

@ -48,7 +48,7 @@ Once it is built you should take a look at `spec/example` to see how the library
Download the sources from our [github repo](https://github.com/getdnsapi/getdns) Download the sources from our [github repo](https://github.com/getdnsapi/getdns)
or from [getdnsapi.net](https://getdnsapi.net) and verify the download using or from [getdnsapi.net](https://getdnsapi.net) and verify the download using
the checksums (SHA1 or MD5) or using gpg to verify the signature. Our keys are the checksums (SHA1 or MD5) or using gpg to verify the signature. Our keys are
available from the [openpgp keyserver](https://keys.openpgp.org/) available from the [pgp keyservers](https://keyserver.pgp.com)
* `willem@nlnetlabs.nl`, key id E5F8F8212F77A498 * `willem@nlnetlabs.nl`, key id E5F8F8212F77A498

View File

@ -15,7 +15,6 @@
#cmakedefine HAVE_LIMITS_H 1 #cmakedefine HAVE_LIMITS_H 1
#cmakedefine HAVE_SYS_LIMITS_H 1 #cmakedefine HAVE_SYS_LIMITS_H 1
#cmakedefine HAVE_STDARG_H 1 #cmakedefine HAVE_STDARG_H 1
#cmakedefine HAVE_STDDEF_H 1
#cmakedefine HAVE_STDINT_H 1 #cmakedefine HAVE_STDINT_H 1
#cmakedefine HAVE_STDIO_H 1 #cmakedefine HAVE_STDIO_H 1
#cmakedefine HAVE_STDLIB_H 1 #cmakedefine HAVE_STDLIB_H 1
@ -242,10 +241,6 @@
# define FD_SETSIZE 1024 # define FD_SETSIZE 1024
# endif # endif
#ifdef __cplusplus
extern "C" {
#endif
/* the version of the windows API enabled */ /* the version of the windows API enabled */
# ifndef WINVER # ifndef WINVER
# define WINVER 0x0600 // 0x0502 # define WINVER 0x0600 // 0x0502
@ -312,11 +307,12 @@ extern "C" {
#include <string.h> #include <string.h>
#endif #endif
#ifdef HAVE_STDLIB_H #ifdef __cplusplus
#include <stdlib.h> extern "C" {
#endif #endif
#ifdef HAVE_STDDEF_H #if STDC_HEADERS
#include <stdlib.h>
#include <stddef.h> #include <stddef.h>
#endif #endif

View File

@ -52,7 +52,7 @@ else ()
"${LIBUV_DIR}/lib" "${LIBUV_DIR}/lib"
) )
if (LIBUV_INCLUDE_DIR AND LIBUV_LIBRARIES) if (LIBUV_INCLUDE_DIR AND LIBUV_LIBRARY)
if (NOT TARGET Libuv::Libuv) if (NOT TARGET Libuv::Libuv)
add_library(Libuv::Libuv UNKNOWN IMPORTED) add_library(Libuv::Libuv UNKNOWN IMPORTED)
set_target_properties(Libuv::Libuv PROPERTIES set_target_properties(Libuv::Libuv PROPERTIES

View File

@ -1,7 +1,7 @@
prefix=@prefix@ prefix=@prefix@
exec_prefix=${prefix} exec_prefix=${prefix}
libdir=@libdir_for_pc_file@ libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
includedir=@includedir_for_pc_file@ includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
Name: getdns Name: getdns
Version: @GETDNS_VERSION@ Version: @GETDNS_VERSION@

View File

@ -1390,7 +1390,6 @@ getdns_context_create_with_extended_memory_functions(
#endif #endif
result->processing = 0; result->processing = 0;
result->destroying = 0; result->destroying = 0;
result->to_destroy = 0;
result->my_mf.mf_arg = userarg; result->my_mf.mf_arg = userarg;
result->my_mf.mf.ext.malloc = malloc; result->my_mf.mf.ext.malloc = malloc;
result->my_mf.mf.ext.realloc = realloc; result->my_mf.mf.ext.realloc = realloc;
@ -1643,11 +1642,8 @@ getdns_context_destroy(struct getdns_context *context)
if (context == NULL) if (context == NULL)
return; return;
/* If being destroyed during getdns callback, fail via assert */
assert(context->processing == 0); assert(context->processing == 0);
if (context->processing == 1) {
context->to_destroy = 1;
return;
}
if (context->destroying) if (context->destroying)
return; return;
@ -3772,6 +3768,7 @@ getdns_context_get_num_pending_requests(const getdns_context* context,
if (context->outbound_requests.count) if (context->outbound_requests.count)
context->extension->vmt->run_once(context->extension, 0); context->extension->vmt->run_once(context->extension, 0);
return context->outbound_requests.count; return context->outbound_requests.count;
} }

View File

@ -397,7 +397,6 @@ struct getdns_context {
int processing; int processing;
int destroying; int destroying;
int to_destroy;
struct mem_funcs mf; struct mem_funcs mf;
struct mem_funcs my_mf; struct mem_funcs my_mf;

View File

@ -529,10 +529,8 @@ _getdns_fp2rr_list(struct mem_funcs *mf,
else while (r == GETDNS_RETURN_GOOD && !feof(in)) { else while (r == GETDNS_RETURN_GOOD && !feof(in)) {
len = GLDNS_RR_BUF_SIZE; len = GLDNS_RR_BUF_SIZE;
dname_len = 0; dname_len = 0;
if (gldns_fp2wire_rr_buf(in, rr, &len, &dname_len, &pst)) { if (gldns_fp2wire_rr_buf(in, rr, &len, &dname_len, &pst))
r = GETDNS_RETURN_GENERIC_ERROR;
break; break;
}
if (dname_len && dname_len < sizeof(pst.prev_rr)) { if (dname_len && dname_len < sizeof(pst.prev_rr)) {
memcpy(pst.prev_rr, rr, dname_len); memcpy(pst.prev_rr, rr, dname_len);
pst.prev_rr_len = dname_len; pst.prev_rr_len = dname_len;

@ -1 +1 @@
Subproject commit 89ff45974cafa7e03f0503ed013fe3e680698c20 Subproject commit afd5b88687f05554513d9caf000f08904e32e6a4

View File

@ -183,7 +183,6 @@
} }
END_TEST END_TEST
#if 0
START_TEST (getdns_context_destroy_7) START_TEST (getdns_context_destroy_7)
{ {
/* /*
@ -206,6 +205,7 @@
RUN_EVENT_LOOP; RUN_EVENT_LOOP;
CONTEXT_DESTROY; CONTEXT_DESTROY;
ck_assert_msg(flag == 1, "flag should == 1, got %d", flag); ck_assert_msg(flag == 1, "flag should == 1, got %d", flag);
} }
END_TEST END_TEST
@ -229,10 +229,10 @@
&flag, &transaction_id, destroy_callbackfn), &flag, &transaction_id, destroy_callbackfn),
GETDNS_RETURN_GOOD, "Return code from getdns_address()"); GETDNS_RETURN_GOOD, "Return code from getdns_address()");
getdns_cancel_callback(context, transaction_id); getdns_cancel_callback(context, transaction_id);
RUN_EVENT_LOOP; RUN_EVENT_LOOP;
CONTEXT_DESTROY; CONTEXT_DESTROY;
ck_assert_msg(flag == 1, "flag should == 1, got %d", flag); ck_assert_msg(flag == 1, "flag should == 1, got %d", flag);
} }
END_TEST END_TEST
@ -264,10 +264,10 @@
RUN_EVENT_LOOP; RUN_EVENT_LOOP;
CONTEXT_DESTROY; CONTEXT_DESTROY;
ck_assert_msg(flag == 1, "flag should == 1, got %d", flag); ck_assert_msg(flag == 1, "flag should == 1, got %d", flag);
} }
END_TEST END_TEST
#endif
void verify_getdns_context_destroy(struct extracted_response *ex_response) void verify_getdns_context_destroy(struct extracted_response *ex_response)
{ {
@ -301,11 +301,10 @@
tcase_add_test(tc_pos, getdns_context_destroy_4); tcase_add_test(tc_pos, getdns_context_destroy_4);
tcase_add_test(tc_pos, getdns_context_destroy_5); tcase_add_test(tc_pos, getdns_context_destroy_5);
tcase_add_test(tc_pos, getdns_context_destroy_6); tcase_add_test(tc_pos, getdns_context_destroy_6);
#if 0 // raise aborts via assertion failures
tcase_add_test_raise_signal(tc_pos, getdns_context_destroy_7, SIGABRT); tcase_add_test_raise_signal(tc_pos, getdns_context_destroy_7, SIGABRT);
tcase_add_test_raise_signal(tc_pos, getdns_context_destroy_8, SIGABRT); tcase_add_test_raise_signal(tc_pos, getdns_context_destroy_8, SIGABRT);
tcase_add_test_raise_signal(tc_pos, getdns_context_destroy_9, SIGABRT); tcase_add_test_raise_signal(tc_pos, getdns_context_destroy_9, SIGABRT);
#endif
suite_add_tcase(s, tc_pos); suite_add_tcase(s, tc_pos);
return s; return s;

View File

@ -134,39 +134,38 @@ for (( ii = 0; ii < 1; ii++)); do
if [[ $HAVE_SSL_HN_AUTH = 1 ]] if [[ $HAVE_SSL_HN_AUTH = 1 ]]
then then
NUM_GOOD_QUERIES=7 NUM_GOOD_QUERIES=8
GOOD_QUERIES=( GOOD_QUERIES=(
"-s -A getdnsapi.net -l U @${SERVER_IP} +edns_cookies" "U" "-"
"-s -A getdnsapi.net -l T @${SERVER_IP}" "T" "-" "-s -A getdnsapi.net -l T @${SERVER_IP}" "T" "-"
"-s -A getdnsapi.net -l U @${SERVER_IP_TSIG}${TSIG_ALG}:${TSIG_NAME}:${TSIG_SECRET}" "U" "-" "-s -A getdnsapi.net -l U @${SERVER_IP_TSIG}${TSIG_ALG}:${TSIG_NAME}:${TSIG_SECRET}" "U" "-"
"-s -A getdnsapi.net -l U @${SERVER_IP_TSIG}${TSIG_NAME}:${TSIG_SECRET}" "U" "-" "-s -A getdnsapi.net -l U @${SERVER_IP_TSIG}${TSIG_NAME}:${TSIG_SECRET}" "U" "-"
"-s -A getdnsapi.net -l L @${TLS_SERVER_IP_NO_NAME}" "L" "N" "-s -A getdnsapi.net -l L @${TLS_SERVER_IP_NO_NAME}" "L" "N"
"-s -A getdnsapi.net -l L -m @${TLS_SERVER_IP}" "L" "S" "-s -A getdnsapi.net -l L -m @${TLS_SERVER_IP}" "L" "S"
"-s -A getdnsapi.net -l L -m @${TLS_SERVER_IP_NO_NAME} -K pin-sha256=\"${TLS_SERVER_KEY}\"" "L" "S" "-s -A getdnsapi.net -l L -m @${TLS_SERVER_IP_NO_NAME} -K pin-sha256=\"${TLS_SERVER_KEY}\"" "L" "S"
"-s -A getdnsapi.net -l L -m @${TLS_SERVER_IP} -K pin-sha256=\"${TLS_SERVER_KEY}\"" "L" "S") "-s -A getdnsapi.net -l L -m @${TLS_SERVER_IP} -K pin-sha256=\"${TLS_SERVER_KEY}\"" "L" "S"
#"-s -A getdnsapi.net -l U @185.49.141.38 +edns_cookies" "U" "-" "-s -G TXT large.getdnsapi.net -l U @${SERVER_IP} -b 512 -D" "U" "-")
#"-s -G TXT large.getdnsapi.net -l U @8.8.8.8 -b 512 -D" "U" "-"
else else
NUM_GOOD_QUERIES=6 NUM_GOOD_QUERIES=6
GOOD_QUERIES=( GOOD_QUERIES=(
"-s -A getdnsapi.net -l U @${SERVER_IP} +edns_cookies" "U" "-"
"-s -A getdnsapi.net -l T @${SERVER_IP}" "T" "-" "-s -A getdnsapi.net -l T @${SERVER_IP}" "T" "-"
"-s -A getdnsapi.net -l U @${SERVER_IP_TSIG}${TSIG_ALG}:${TSIG_NAME}:${TSIG_SECRET}" "U" "-" "-s -A getdnsapi.net -l U @${SERVER_IP_TSIG}${TSIG_ALG}:${TSIG_NAME}:${TSIG_SECRET}" "U" "-"
"-s -A getdnsapi.net -l U @${SERVER_IP_TSIG}${TSIG_NAME}:${TSIG_SECRET}" "U" "-" "-s -A getdnsapi.net -l U @${SERVER_IP_TSIG}${TSIG_NAME}:${TSIG_SECRET}" "U" "-"
"-s -A getdnsapi.net -l L @${TLS_SERVER_IP_NO_NAME}" "L" "N" "-s -A getdnsapi.net -l L @${TLS_SERVER_IP_NO_NAME}" "L" "N"
"-s -A getdnsapi.net -l L -m @${TLS_SERVER_IP_NO_NAME} -K pin-sha256=\"${TLS_SERVER_KEY}\"" "L" "S" "-s -A getdnsapi.net -l L -m @${TLS_SERVER_IP_NO_NAME} -K pin-sha256=\"${TLS_SERVER_KEY}\"" "L" "S"
"-s -G TXT large.getdnsapi.net -l U @${SERVER_IP} -b 512 -D" "U" "-"
"-s -A getdnsapi.net -l L -m @${TLS_SERVER_SS_IP_NO_NAME} -K pin-sha256=\"${TLS_SERVER_SS_KEY}\"" "L" "S") "-s -A getdnsapi.net -l L -m @${TLS_SERVER_SS_IP_NO_NAME} -K pin-sha256=\"${TLS_SERVER_SS_KEY}\"" "L" "S")
#"-s -A getdnsapi.net -l U @185.49.141.38 +edns_cookies" "U" "-"
# "-s -G TXT large.getdnsapi.net -l U @8.8.8.8 -b 512 -D" "U" "-"
fi fi
NUM_GOOD_FB_QUERIES=4 NUM_GOOD_FB_QUERIES=6
GOOD_FALLBACK_QUERIES=( GOOD_FALLBACK_QUERIES=(
"-s -A getdnsapi.net -l LU @${SERVER_IP}" "U" "-"
"-s -A getdnsapi.net -l LT @${SERVER_IP}" "T" "-" "-s -A getdnsapi.net -l LT @${SERVER_IP}" "T" "-"
"-s -A getdnsapi.net -l LT @${TLS_SERVER_IP_NO_NAME}" "L" "N" "-s -A getdnsapi.net -l LT @${TLS_SERVER_IP_NO_NAME}" "L" "N"
"-s -A getdnsapi.net -l LT -m @${TLS_SERVER_IP_NO_NAME}" "L" "N" "-s -A getdnsapi.net -l LT -m @${TLS_SERVER_IP_NO_NAME}" "L" "N"
"-s -A getdnsapi.net -l L @${SERVER_IP} @${TLS_SERVER_IP_NO_NAME}" "L" "-") "-s -A getdnsapi.net -l L @${SERVER_IP} @${TLS_SERVER_IP_NO_NAME}" "L" "-"
#"-s -A getdnsapi.net -l LU @${SERVER_IP}" "U" "-" "-s -G TXT large.getdnsapi.net -l UT @${SERVER_IP} -b 512 -D" "T" "-")
#"-s -G TXT large.getdnsapi.net -l UT @$8.8.8.8 -b 512 -D" "T" "-"
NOT_AVAILABLE_QUERIES=( NOT_AVAILABLE_QUERIES=(
"-s -A getdnsapi.net -l L @${SERVER_IP}" "-s -A getdnsapi.net -l L @${SERVER_IP}"

2
stubby

@ -1 +1 @@
Subproject commit b53867d1ec467822dbd9e1a0ad6598f84a9f5ed7 Subproject commit d477475a1141b4f6f86518c444bce36db3dcd29f