From: W.C.A. Wijngaards Date: Wed, 17 Jun 2026 09:37:06 +0000 (+0200) Subject: - Fix that after fast_reload the disown of the auth zone X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5c550f4548545cccb183d30377d553b9d104f098;p=thirdparty%2Funbound.git - Fix that after fast_reload the disown of the auth zone transfer task cleans the chunk list. Also fix the auth_transfer_limit test to use a forwarder for each type of failure, so the one is not blocked by the other waiting. --- diff --git a/doc/Changelog b/doc/Changelog index a74d61dd9..68588d496 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,9 @@ +17 June 2026: Wouter + - Fix that after fast_reload the disown of the auth zone + transfer task cleans the chunk list. Also fix the + auth_transfer_limit test to use a forwarder for each type + of failure, so the one is not blocked by the other waiting. + 16 June 2026: Wouter - Fix to disallow $INCLUDE for secondary zones. Start up of server continues if a secondary zone fails to load. diff --git a/services/authzone.c b/services/authzone.c index 7e07168da..f5f4356b1 100644 --- a/services/authzone.c +++ b/services/authzone.c @@ -5540,6 +5540,8 @@ xfr_stop_lookup(struct auth_master** lookup_target, void* lookup_unique_info, static void xfr_transfer_disown(struct auth_xfer* xfr) { + /* remove data chunks */ + auth_chunks_delete(xfr->task_transfer); /* remove timer (from this worker's event base) */ comm_timer_delete(xfr->task_transfer->timer); xfr->task_transfer->timer = NULL; diff --git a/testdata/auth_transfer_limit.tdir/auth_transfer_limit.conf b/testdata/auth_transfer_limit.tdir/auth_transfer_limit.conf index 94b4475b9..7052eef43 100644 --- a/testdata/auth_transfer_limit.tdir/auth_transfer_limit.conf +++ b/testdata/auth_transfer_limit.tdir/auth_transfer_limit.conf @@ -22,7 +22,7 @@ auth-zone: name: "example2.com" for-upstream: yes for-downstream: yes - master: "127.0.0.1@@TOPORT@" + master: "127.0.0.1@@TOPORT2@" max-transfer-size: 512 max-transfer-time: 2000 remote-control: diff --git a/testdata/auth_transfer_limit.tdir/auth_transfer_limit.post b/testdata/auth_transfer_limit.tdir/auth_transfer_limit.post index 4a4d8342a..8ec0f5fc3 100644 --- a/testdata/auth_transfer_limit.tdir/auth_transfer_limit.post +++ b/testdata/auth_transfer_limit.tdir/auth_transfer_limit.post @@ -7,8 +7,10 @@ # do your teardown here . ../common.sh kill_pid $FWD_PID +kill_pid $FWD2_PID kill_pid $UNBOUND_PID rm -f $CONTROL_PATH/controlpipe.$CONTROL_PID echo "> cat logfiles" -cat fwd.log +cat fwd.log +cat fwd2.log cat unbound.log diff --git a/testdata/auth_transfer_limit.tdir/auth_transfer_limit.pre b/testdata/auth_transfer_limit.tdir/auth_transfer_limit.pre index 399101ff5..52a1c09dd 100644 --- a/testdata/auth_transfer_limit.tdir/auth_transfer_limit.pre +++ b/testdata/auth_transfer_limit.tdir/auth_transfer_limit.pre @@ -13,22 +13,33 @@ else fi echo "TEST_FAST_RELOAD=$TEST_FAST_RELOAD" >> .tpkg.var.test -get_random_port 2 +get_random_port 3 UNBOUND_PORT=$RND_PORT FWD_PORT=$(($RND_PORT + 1)) +FWD2_PORT=$(($RND_PORT + 2)) echo "UNBOUND_PORT=$UNBOUND_PORT" >> .tpkg.var.test echo "FWD_PORT=$FWD_PORT" >> .tpkg.var.test +echo "FWD2_PORT=$FWD2_PORT" >> .tpkg.var.test -# start forwarder +# start forwarders get_ldns_testns $LDNS_TESTNS -p $FWD_PORT auth_transfer_limit.testns >fwd.log 2>&1 & FWD_PID=$! echo "FWD_PID=$FWD_PID" >> .tpkg.var.test +$LDNS_TESTNS -p $FWD2_PORT auth_transfer_limit.testns2 >fwd2.log 2>&1 & +FWD2_PID=$! +echo "FWD2_PID=$FWD2_PID" >> .tpkg.var.test + # make config file CONTROL_PATH=/tmp CONTROL_PID=$$ -sed -e 's/@PORT\@/'$UNBOUND_PORT'/' -e 's/@TOPORT\@/'$FWD_PORT'/' -e 's?@CONTROL_PATH\@?'$CONTROL_PATH'?' -e 's/@CONTROL_PID@/'$CONTROL_PID'/' < auth_transfer_limit.conf > ub.conf +sed -e 's/@PORT\@/'$UNBOUND_PORT'/' \ + -e 's/@TOPORT\@/'$FWD_PORT'/' \ + -e 's/@TOPORT2\@/'$FWD2_PORT'/' \ + -e 's?@CONTROL_PATH\@?'$CONTROL_PATH'?' \ + -e 's/@CONTROL_PID@/'$CONTROL_PID'/' \ + < auth_transfer_limit.conf > ub.conf # start unbound in the background $PRE/unbound -d -c ub.conf >unbound.log 2>&1 & UNBOUND_PID=$! @@ -38,5 +49,6 @@ echo "CONTROL_PID=$CONTROL_PID" >> .tpkg.var.test cat .tpkg.var.test wait_ldns_testns_up fwd.log +wait_ldns_testns_up fwd2.log wait_unbound_up unbound.log diff --git a/testdata/auth_transfer_limit.tdir/auth_transfer_limit.test b/testdata/auth_transfer_limit.tdir/auth_transfer_limit.test index d4a0131ec..afd458ea7 100644 --- a/testdata/auth_transfer_limit.tdir/auth_transfer_limit.test +++ b/testdata/auth_transfer_limit.tdir/auth_transfer_limit.test @@ -24,7 +24,7 @@ if grep "auth zone example2.com. transfer.*exceeded 2000 msec" unbound.log; then echo "OK" else echo "Not OK" - exit 1 + DEBUG exit 1 fi if test "$TEST_FAST_RELOAD" == "yes"; then diff --git a/testdata/auth_transfer_limit.tdir/auth_transfer_limit.testns b/testdata/auth_transfer_limit.tdir/auth_transfer_limit.testns index 3847d723f..9b8694d45 100644 --- a/testdata/auth_transfer_limit.tdir/auth_transfer_limit.testns +++ b/testdata/auth_transfer_limit.tdir/auth_transfer_limit.testns @@ -36,39 +36,3 @@ SECTION ANSWER www.example.com. IN A 1.2.3.4 example.com. IN SOA ns.example.com. hostmaster.example.com. 1 3600 900 86400 3600 ENTRY_END - -ENTRY_BEGIN -MATCH opcode qtype qname -ADJUST copy_id -REPLY QR AA NOERROR -SECTION QUESTION -example2.com. IN SOA -SECTION ANSWER -example2.com. IN SOA ns.example2.com. hostmaster.example2.com. 1 3600 900 86400 3600 -ENTRY_END - -ENTRY_BEGIN -MATCH opcode qtype qname -ADJUST copy_id -REPLY QR AA NOERROR -SECTION QUESTION -example2.com. IN AXFR -SECTION ANSWER -example2.com. IN SOA ns.example2.com. hostmaster.example2.com. 1 3600 900 86400 3600 -example2.com. IN NS ns.example2.net. -EXTRA_PACKET -REPLY QR AA NOERROR -; too slow -ADJUST packet_sleep=3 -SECTION QUESTION -example2.com. IN AXFR -SECTION ANSWER -extra.example2.com. IN A 1.2.3.5 -EXTRA_PACKET -REPLY QR AA NOERROR -SECTION QUESTION -example2.com. IN AXFR -SECTION ANSWER -www.example2.com. IN A 1.2.3.4 -example2.com. IN SOA ns.example2.com. hostmaster.example2.com. 1 3600 900 86400 3600 -ENTRY_END diff --git a/testdata/auth_transfer_limit.tdir/auth_transfer_limit.testns2 b/testdata/auth_transfer_limit.tdir/auth_transfer_limit.testns2 new file mode 100644 index 000000000..6356aa93a --- /dev/null +++ b/testdata/auth_transfer_limit.tdir/auth_transfer_limit.testns2 @@ -0,0 +1,35 @@ +ENTRY_BEGIN +MATCH opcode qtype qname +ADJUST copy_id +REPLY QR AA NOERROR +SECTION QUESTION +example2.com. IN SOA +SECTION ANSWER +example2.com. IN SOA ns.example2.com. hostmaster.example2.com. 1 3600 900 86400 3600 +ENTRY_END + +ENTRY_BEGIN +MATCH opcode qtype qname +ADJUST copy_id +REPLY QR AA NOERROR +SECTION QUESTION +example2.com. IN AXFR +SECTION ANSWER +example2.com. IN SOA ns.example2.com. hostmaster.example2.com. 1 3600 900 86400 3600 +example2.com. IN NS ns.example2.net. +EXTRA_PACKET +REPLY QR AA NOERROR +; too slow +ADJUST packet_sleep=3 +SECTION QUESTION +example2.com. IN AXFR +SECTION ANSWER +extra.example2.com. IN A 1.2.3.5 +EXTRA_PACKET +REPLY QR AA NOERROR +SECTION QUESTION +example2.com. IN AXFR +SECTION ANSWER +www.example2.com. IN A 1.2.3.4 +example2.com. IN SOA ns.example2.com. hostmaster.example2.com. 1 3600 900 86400 3600 +ENTRY_END