djbdns/500-cutom-dnscache-maxloop.patch

32 lines
856 B
Diff
Raw Permalink Normal View History

--- djbdns-1.05/query.c 2012-08-30 22:14:28.885825918 +0800
+++ djbdns-1.05-new/query.c 2012-08-30 22:22:23.887727783 +0800
@@ -220,7 +217,7 @@
NEWNAME:
- if (++z->loop == 150) goto DIE;
+ if (++z->loop == QUERY_MAXLOOP) goto DIE;
d = z->name[z->level];
dtype = z->level ? DNS_T_A : z->type;
dlen = dns_domain_length(d);
@@ -489,7 +486,7 @@
HAVEPACKET:
- if (++z->loop == 150) goto DIE;
+ if (++z->loop == QUERY_MAXLOOP) goto DIE;
buf = z->qm->dt.packet;
len = z->qm->dt.packetlen;
diff -ru djbdns-1.05/query.h djbdns-1.05-new/query.h
--- djbdns-1.05/query.h 2001-02-11 22:11:45.000000000 +0100
+++ djbdns-1.05-new/query.h 2005-11-10 18:39:58.000000000 +0100
@@ -7,6 +7,7 @@
#define QUERY_MAXLEVEL 5
#define QUERY_MAXALIAS 16
#define QUERY_MAXNS 16
+#define QUERY_MAXLOOP 500
struct query {
unsigned int loop;