Commit Diff


commit - 395f7f0c30fea3e896ffc5bc456d003469193e40
commit + 8d753d401a4362faedc11124a91baffeae1a7d19
blob - 26da01248c5012884b76552228192966b5f64b1b
blob + e576bd6476541c6014c41083f0699039ab39c7bd
--- axfr.c
+++ axfr.c
@@ -62,7 +62,7 @@ struct axfrentry {
 } *an1, *an2, *anp;
 
 
-static const char rcsid[] = "$Id: axfr.c,v 1.1 2011/09/19 19:59:23 pbug Exp $";
+static const char rcsid[] = "$Id: axfr.c,v 1.2 2011/09/22 22:16:46 pbug Exp $";
 
 /*
  * INIT_AXFR - initialize the axfr singly linked list
@@ -384,10 +384,15 @@ axfr_connection(int so, char *address, int is_ipv6, DB
 			goto drop;
 		}
 
-		if (ntohs(question->hdr->qtype) != DNS_TYPE_AXFR &&
-			ntohs(question->hdr->qtype) != DNS_TYPE_SOA) {
-			syslog(LOG_INFO, "AXFR question wasn't for types AXFR or SOA (requested type: %d), drop", ntohs(question->hdr->qtype));
+		switch (ntohs(question->hdr->qtype)) {
+		case DNS_TYPE_AXFR:
+		case DNS_TYPE_IXFR:
+		case DNS_TYPE_SOA:
+				break;
+		default:
+			syslog(LOG_INFO, "AXFR question wasn't for valid types (ixfr, axfr, soa) with requested type %d, drop", ntohs(question->hdr->qtype));	
 			goto drop;
+
 		}
 
 		/* now we can be reasonably sure that it's an AXFR for us */
@@ -467,7 +472,9 @@ axfr_connection(int so, char *address, int is_ipv6, DB
 			continue;
 		}
 
-		syslog(LOG_INFO, "AXFR request for zone \"%s\", replying...", question->converted_name);
+		syslog(LOG_INFO, "%s request for zone \"%s\", replying...", 
+			(ntohs(question->hdr->qtype) == DNS_TYPE_AXFR ? "AXFR"
+				: "IXFR"), question->converted_name);
 
 		outlen = build_header(db, (reply + 2), (p + 2), question, 0);
 		outlen = build_soa(db, (reply + 2), outlen, &soa, question);
blob - f6b5d59e3ef009f4b18847b23ece469a3696f029
blob + 1af4c8cdb95961bdefd198eb5841be98c3647dc2
--- dns.h
+++ dns.h
@@ -135,6 +135,7 @@ struct dns_question_hdr {
 #define DNS_TYPE_MX	15
 #define DNS_TYPE_TXT	16
 
+#define DNS_TYPE_IXFR	251		/* RFC 1995, page 2  */
 #define DNS_TYPE_AXFR	252		/* RFC 5936, page 10 */
 #define DNS_TYPE_ANY	255