rpms/bind/devel bind-9.3.1-flush-cache.patch, NONE, 1.1 bind.spec, 1.71, 1.72

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Tue Sep 27 18:16:02 UTC 2005


Author: jvdias

Update of /cvs/dist/rpms/bind/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv1641

Modified Files:
	bind.spec 
Added Files:
	bind-9.3.1-flush-cache.patch 
Log Message:
When forwarder nameservers are changed with D-BUS, flush the cache.

bind-9.3.1-flush-cache.patch:
 dbus_mgr.c |   38 +++++++++++++++++++++++++++++---------
 1 files changed, 29 insertions(+), 9 deletions(-)

--- NEW FILE bind-9.3.1-flush-cache.patch ---
--- bind-9.3.1/bin/named/dbus_mgr.c.flush_cache	2005-09-26 18:35:36.000000000 -0400
+++ bind-9.3.1/bin/named/dbus_mgr.c	2005-09-27 14:05:59.000000000 -0400
@@ -555,6 +555,15 @@
     return 0L;
 }
 
+static
+dns_fwdtable_t *dbus_mgr_get_view_and_fwdtable( dns_view_t **viewp )
+{
+    *viewp = dbus_mgr_get_localhost_view();
+    if( *viewp != 0L )
+	return (*viewp)->fwdtable;
+    return 0L;
+}
+
 static int dbus_mgr_ifwdr_comparator( const void *p1, const void *p2 )
 {
     char  n1buf[ DNS_NAME_FORMATSIZE ]="", *n1p=&(n1buf[0]),
@@ -654,12 +663,12 @@
 {
     isc_result_t   result = ISC_R_SUCCESS;    
     dns_fwdtable_t *fwdtable;
-    dns_view_t     *view;
+    dns_view_t     *view=0L;
     dns_name_t     *dnsName;
     isc_sockaddr_t   *sa, *nsa;
     dns_forwarders_t *fwdr=0L;
        
-    fwdtable = dbus_mgr_get_fwdtable();
+    fwdtable = dbus_mgr_get_view_and_fwdtable(&view);
 
     if( fwdtable == 0L )
     {
@@ -709,11 +718,13 @@
 					   fwdpolicy
 					 ) ;
 
+		if( view != 0L )
+		    dns_view_flushcache( view );
+
 		isc_task_endexclusive(mgr->task);	
 
 		if( result != ISC_R_SUCCESS )
 		    return result;
-
 	    }
 	    continue;
 	}
@@ -726,6 +737,9 @@
 	    {
 		result = dns_fwdtable_delete( fwdtable, dnsName );
 
+		if( view != 0L )
+		    dns_view_flushcache( view );
+
 		isc_task_endexclusive(mgr->task);
 
 		if( result != ISC_R_SUCCESS )
@@ -767,7 +781,10 @@
 		ISC_LINK_INIT( nsa, link );
 		ISC_LIST_APPEND( fwdr->addrs, nsa, link );
 	    }	    
-	    
+
+	    if( view != 0L )
+		dns_view_flushcache( view );
+
 	    isc_task_endexclusive(mgr->task);
 
 	}else
@@ -1491,7 +1508,8 @@
 	sprintf(error_message,"out of memory");
 	dbus_svc_send( dbus, ERROR, serial, &new_serial, sender, path, interface, member,
 		       TYPE_STRING, error_name, TYPE_STRING, error_message, TYPE_INVALID 
-	             );	    
+	             );	
+	return;
     }	
     
     fwdtable = dbus_mgr_get_fwdtable();
@@ -1522,6 +1540,7 @@
 	    dbus_svc_send( dbus, ERROR, serial, &new_serial, sender, path, interface, member,
 			   TYPE_STRING, error_name, TYPE_STRING, error_message, TYPE_INVALID 
 		);	    
+	    return;
 	}	
 	
     }else
@@ -1535,11 +1554,12 @@
 		                        ) ;
 	}else
 	{
+	    sprintf(error_name,"com.redhat.dbus.NotFound");
 	    sprintf(error_message,"Not Found");
-	    dbus_svc_message_append_args( dbus, msg, 
-					  TYPE_STRING, error_message,
-					  TYPE_INVALID
-		                        ) ;
+	    dbus_svc_send( dbus, ERROR, serial, &new_serial, sender, path, interface, member,
+			   TYPE_STRING, error_name, TYPE_STRING, error_message, TYPE_INVALID 
+		         );	   
+	    return;
 	}
     }
     dbus_svc_send_message( dbus, msg, &new_serial );


Index: bind.spec
===================================================================
RCS file: /cvs/dist/rpms/bind/devel/bind.spec,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -r1.71 -r1.72
--- bind.spec	26 Sep 2005 23:23:17 -0000	1.71
+++ bind.spec	27 Sep 2005 18:15:59 -0000	1.72
@@ -10,7 +10,7 @@
 Name: bind
 License: BSD-like
 Version: 9.3.1
-Release: 12
+Release: 14
 Epoch:   24
 Url: http://www.isc.org/products/BIND/
 Buildroot: %{_tmppath}/%{name}-root
@@ -56,6 +56,7 @@
 Patch23: bind-9.3.1-dbus_archdep_libdir.patch
 Patch24: bind-9.3.1-t_no_default_lookups.patch
 Patch25: bind-9.3.1-fix_no_dbus_daemon.patch
+Patch26: bind-9.3.1-flush-cache.patch
 Requires(pre,preun): shadow-utils
 Requires(post,preun): chkconfig
 Requires(post): textutils, fileutils, sed, grep
@@ -224,6 +225,7 @@
 %endif
 %patch24 -p1 -b .-t_no_default_lookups
 %patch25 -p1 -b .fix_no_dbus_daemon
+%patch26 -p1 -b .flush_cache
 %build
 libtoolize --copy --force; aclocal; autoconf
 cp -f /usr/share/libtool/config.{guess,sub} .
@@ -715,7 +717,10 @@
 :;
 
 %changelog
-* Mon Sep 26 2005 Jason Vas Dias <jvdias at redhat.com> - 24.9.3.1-12
+* Tue Sep 27 2005 Jason Vas Dias <jvdias at redhat.com> - 24:9.3.1-14
+- When forwarder nameservers are changed with D-BUS, flush the cache.
+
+* Mon Sep 26 2005 Jason Vas Dias <jvdias at redhat.com> - 24:9.3.1-12
 - fix bug 168302: use %{__cc} for compiling dns-keygen
 - fix bug 167682: bind-chroot directory permissions
 - fix issues with -D dbus option when dbus service not running or disabled




More information about the fedora-cvs-commits mailing list