dlz-bind: Add support for BIND 9.11.x
authorAmitay Isaacs <amitay@gmail.com>
Mon, 26 Sep 2016 14:51:03 +0000 (00:51 +1000)
committerJeremy Allison <jra@samba.org>
Thu, 27 Oct 2016 21:53:13 +0000 (23:53 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12366

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/dns_server/dlz_minimal.h
source4/dns_server/wscript_build

index 7c2163d39f10360462c5f7f2160df5120bc6ed89..89ada7a6fdb03a64bdb36720252b58a028e5b047 100644 (file)
@@ -31,6 +31,9 @@
 #elif defined (BIND_VERSION_9_10)
 # define DLZ_DLOPEN_VERSION 3
 # define DNS_CLIENTINFO_VERSION 1
+#elif defined (BIND_VERSION_9_11)
+# define DLZ_DLOPEN_VERSION 3
+# define DNS_CLIENTINFO_VERSION 2
 #else
 # error Unsupported BIND version
 #endif
@@ -118,6 +121,30 @@ typedef struct dns_clientinfomethods {
        dns_clientinfo_sourceip_t sourceip;
 } dns_clientinfomethods_t;
 
+#elif DNS_CLIENTINFO_VERSION == 2
+
+typedef struct dns_clientinfo {
+       uint16_t version;
+       void *data;
+       void *dbversion;
+} dns_clientinfo_t;
+
+typedef isc_result_t (*dns_clientinfo_sourceip_t)(dns_clientinfo_t *client,
+                                                 isc_sockaddr_t **addrp);
+
+typedef isc_result_t (*dns_clientinfo_version_t)(dns_clientinfo_t *client,
+                                                void **addrp);
+
+#define DNS_CLIENTINFOMETHODS_VERSION 2
+#define DNS_CLIENTINFOMETHODS_AGE 1
+
+typedef struct dns_clientinfomethods {
+       uint16_t version;
+       uint16_t age;
+       dns_clientinfo_sourceip_t sourceip;
+       dns_clientinfo_version_t dbversion;
+} dns_clientinfomethods_t;
+
 #endif /* DNS_CLIENTINFO_VERSION */
 
 #endif /* DLZ_DLOPEN_VERSION > 1 */
index 75f3499ae6b7371b8281ddac3565782b611e979d..396ed768d6d42b66d4aa9fb5aec0fd297a558356 100644 (file)
@@ -47,6 +47,16 @@ bld.SAMBA_LIBRARY('dlz_bind9_10',
                   deps='samba-hostconfig samdb-common gensec popt dnsserver_common',
                   enabled=bld.AD_DC_BUILD_IS_ENABLED())
 
+bld.SAMBA_LIBRARY('dlz_bind9_11',
+                  source='dlz_bind9.c',
+                  cflags='-DBIND_VERSION_9_11',
+                  private_library=True,
+                  link_name='modules/bind9/dlz_bind9_11.so',
+                  realname='dlz_bind9_11.so',
+                  install_path='${MODULESDIR}/bind9',
+                  deps='samba-hostconfig samdb-common gensec popt dnsserver_common',
+                  enabled=bld.AD_DC_BUILD_IS_ENABLED())
+
 bld.SAMBA_LIBRARY('dlz_bind9_for_torture',
                   source='dlz_bind9.c',
                   cflags='-DBIND_VERSION_9_8',