]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Handle axfr's of empty zones correctly.
authorMichael Sawyer <source@isc.org>
Fri, 28 Jul 2000 21:56:53 +0000 (21:56 +0000)
committerMichael Sawyer <source@isc.org>
Fri, 28 Jul 2000 21:56:53 +0000 (21:56 +0000)
bin/dig/dighost.c

index 5f74319cc0c7c5f246c2848a40a05d72b22aa17a..3665e100589a93da317198b90249b049a80ebbb1 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: dighost.c,v 1.103 2000/07/27 23:52:29 bwelling Exp $ */
+/* $Id: dighost.c,v 1.104 2000/07/28 21:56:53 mws Exp $ */
 
 /*
  * Notice to programmers:  Do not use this code as an example of how to
@@ -1797,7 +1797,20 @@ check_for_more_data(dig_query_t *query, dns_message_t *msg,
                                        dns_rdata_freestruct(&soa);
                                        goto next_rdata;
                                }
+                               if (query->lookup->rdtype ==
+                                   dns_rdatatype_axfr) {
+                                       debug("doing axfr, got second SOA");
+                                       dns_rdata_freestruct(&soa);
+                                       goto xfr_done;
+                               }
                                if (!query->second_rr_rcvd) {
+                                       if (soa.serial ==
+                                           query->first_rr_serial) {
+                                               debug("doing ixfr, got "
+                                                     "empty zone");
+                                               dns_rdata_freestruct(&soa);
+                                               goto xfr_done;
+                                       }
                                        debug("this is the second %d",
                                               query->lookup->ixfr_serial);
                                        query->second_rr_rcvd = ISC_TRUE;