summaryrefslogtreecommitdiff
path: root/net-dns/djbdns/files/increase-cname-recustion-depth.patch
diff options
context:
space:
mode:
Diffstat (limited to 'net-dns/djbdns/files/increase-cname-recustion-depth.patch')
-rw-r--r--net-dns/djbdns/files/increase-cname-recustion-depth.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/net-dns/djbdns/files/increase-cname-recustion-depth.patch b/net-dns/djbdns/files/increase-cname-recustion-depth.patch
new file mode 100644
index 000000000000..3415f6567056
--- /dev/null
+++ b/net-dns/djbdns/files/increase-cname-recustion-depth.patch
@@ -0,0 +1,43 @@
+From d8534e8482bdd3f6e4ae1dca8452e65c24dd34f7 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Fri, 5 Aug 2016 09:13:11 -0400
+Subject: [PATCH 1/1] query.c: increase recursion depth to 200.
+
+The recursion loop for CNAME resolution has an upper limit of 100
+iterations by default. This has proven too small in some cases where
+large CDNs are concerned. This commit increases the limit to 200.
+
+The patch was based on the OpenWrt fix, supplied by user ylxu.
+
+Gentoo-Bug: 590548
+OpenWrt-Bug: 5881
+SMEServer-Bug: 8362
+---
+ query.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/query.c b/query.c
+index 46cdc00..61fe708 100644
+--- a/query.c
++++ b/query.c
+@@ -203,7 +203,7 @@ static int doit(struct query *z,int state)
+
+
+ NEWNAME:
+- if (++z->loop == 100) goto DIE;
++ if (++z->loop == 200) goto DIE;
+ d = z->name[z->level];
+ dtype = z->level ? DNS_T_A : z->type;
+ dlen = dns_domain_length(d);
+@@ -449,7 +449,7 @@ static int doit(struct query *z,int state)
+
+
+ HAVEPACKET:
+- if (++z->loop == 100) goto DIE;
++ if (++z->loop == 200) goto DIE;
+ buf = z->dt.packet;
+ len = z->dt.packetlen;
+
+--
+2.7.3
+