]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
3288. [bug] dlz_destroy() function wasn't correctly registered
authorEvan Hunt <each@isc.org>
Wed, 22 Feb 2012 21:44:52 +0000 (21:44 +0000)
committerEvan Hunt <each@isc.org>
Wed, 22 Feb 2012 21:44:52 +0000 (21:44 +0000)
by the DLZ dlopen driver. [RT #28056]

CHANGES
bin/named/unix/dlz_dlopen_driver.c
bin/tests/system/dlzexternal/tests.sh

diff --git a/CHANGES b/CHANGES
index 8492de08e7f3515ce9128c78ab70d09d53eaad4a..9f6140a84e30c2fd922742edf1aa777381efc3d2 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+3288.  [bug]           dlz_destroy() function wasn't correctly registered
+                       by the DLZ dlopen driver. [RT #28056]
+
 3287.  [port]          Update ans.pl to work with Net::DNS 0.68. [RT #28028]
 
 3286.  [bug]           Managed key maintenance timer could fail to start
index 09e8cf5b4184426aac29c8786363faadd01c10c5..84f26fbe8a633447d94f954d5185ebc7fabf1a7a 100644 (file)
@@ -14,7 +14,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: dlz_dlopen_driver.c,v 1.6 2011/10/27 23:01:59 smann Exp $ */
+/* $Id: dlz_dlopen_driver.c,v 1.6.96.1 2012/02/22 21:44:52 each Exp $ */
 
 #include <config.h>
 
@@ -316,6 +316,8 @@ dlopen_dlz_create(const char *dlzname, unsigned int argc, char *argv[],
                dl_load_symbol(cd, "dlz_subrdataset", ISC_FALSE);
        cd->dlz_delrdataset = (dlz_dlopen_delrdataset_t *)
                dl_load_symbol(cd, "dlz_delrdataset", ISC_FALSE);
+       cd->dlz_destroy = (dlz_dlopen_destroy_t *)
+               dl_load_symbol(cd, "dlz_destroy", ISC_FALSE);
 
        /* Check the version of the API is the same */
        cd->version = cd->dlz_version(&cd->flags);
index 3272b8b5ca09bb3f49e875f9651c8df1d026ac3f..062a49e1c0d499569493cbcf8978ef334abe9d91 100644 (file)
@@ -60,4 +60,14 @@ addr=`eval echo $out | cut -f1 -d'#'`
 [ "$ret" -eq 0 ] || echo "I:failed"
 status=`expr $status + $ret`
 
+echo "I:testing DLZ driver is cleaned up on reload"
+$RNDC -c ../common/rndc.conf -s 10.53.0.1 -p 9953 reload 2>&1 | sed 's/^/I:ns1 /'
+for i in 0 1 2 3 4 5 6 7 8 9; do
+    ret=0
+    grep 'dlz_example: shutting down zone example.nil' ns1/named.run > /dev/null 2>&1 || ret=1
+    [ "$ret" -eq 0 ] && break
+done
+[ "$ret" -eq 0 ] || echo "I:failed"
+status=`expr $status + $ret`
+
 exit $status