summaryrefslogtreecommitdiff
path: root/net-dns/djbdns
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-06-15 13:38:09 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-06-15 13:38:09 +0100
commitdb70871b2044b9bfde346d6f4027dafb0a013c4c (patch)
tree34548aee54e5458d3754bd8c8f987acdb5ee444c /net-dns/djbdns
parent1c382dc5dbc52576ac2300fee0498af8af44e7b4 (diff)
gentoo auto-resync : 15:06:2023 - 13:38:09
Diffstat (limited to 'net-dns/djbdns')
-rw-r--r--net-dns/djbdns/Manifest4
-rw-r--r--net-dns/djbdns/files/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries-ipv6-test28.patch351
-rw-r--r--net-dns/djbdns/files/CVE2008-4392_0002-dnscache-cache-soa-records-ipv6.patch68
-rw-r--r--net-dns/djbdns/files/headtail-r1.patch67
-rw-r--r--net-dns/djbdns/files/makefile-parallel-test25.patch91
5 files changed, 0 insertions, 581 deletions
diff --git a/net-dns/djbdns/Manifest b/net-dns/djbdns/Manifest
index fa2679ac195c..eb2d0068dd43 100644
--- a/net-dns/djbdns/Manifest
+++ b/net-dns/djbdns/Manifest
@@ -1,18 +1,14 @@
AUX 1.05-errno-r1.patch 242 BLAKE2B b02d686bbdad4178de2e8ba822feeeec5a3aa4549119c86ec806bfc34d0bebdcef7ee6bb2f57ffe73dc42e9d96b2bf08a28be7502aa8974f8f96cd32dcece178 SHA512 086d02600034d486f084fd2500aba9041dfa02110781594cdc3781a3ad7823f61f11c54c053c8c1241f58660527abe536906aba0e7f6c49ed3b8dbd74ba8f2b7
AUX AR-and-RANLIB-support.patch 1208 BLAKE2B 19f2ee53ae5dde37551245775964a789f812870a50311a6b8be361af8c655222acc416e641133561b2953390f345b53032d10b7aeb4e34ff0ea7aa55b43eb7f3 SHA512 b1b73a4bf83b6ed4643370c0f1d43c65b96f25cc7582fe230003c31444b4e58476130c9466dc40c197669333882a682b8addf3c0fedc66a2bb341f24d0101759
-AUX CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries-ipv6-test28.patch 9954 BLAKE2B ab189b25421c016bd24ecc34d9eae3552eeeb1303d158a2adeeb9c27b48a8935425d76f803104ba0be4bcc1bacd6cac48fb9b800c7401ea306d017525404b0cb SHA512 3ff6e971739bfe7f0fd7defd6520f4a03f88dd907668018c10efd91d03e4dbc2068773953d6feed22308d82fb2d38066b2102c6f6fd738c15c4bee6835a52dce
AUX CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries-ipv6-test32.patch 9991 BLAKE2B 101b6ffc1e9a5710872d10f805ffbbb591135b5371c258d9883192cf1e9d72c608b9a2d4c5c3ad112716c3fcb9a503759a4fa8d36f27b749e5cc4da7fd49308a SHA512 eaca39e80759809328ce905ec8525a050f32079e28e0d5ed647ceaa9eedc791a2d02472414ee4189c299f2e3e193f67f372da70057497a719db4867f95fdf96a
AUX CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries-r1.patch 9914 BLAKE2B 3224e58eac5ac254359158a193b8a4c7618ff12826cce0f71b7c45e9c886ff54d1fb883d02a6b2d80801f395b721dee46390b6b5191e22cc5f2d75da06f2b08c SHA512 59e9aae2fd8e7c1e4d275066afceaade3b1276c6cda78cd58fef1dfbe9749c9e1bb415a80643b3c50a33372166aec055a9b3a6bcb3ed4cfd77e6e6038e069cff
AUX CVE2008-4392_0002-dnscache-cache-soa-records-ipv6-test29.patch 3020 BLAKE2B f5d0c45ce72f327e85ccbccde92281afa9e04b56d86a48f8ae3dd659c202bbedf5534760d1bf81bfcb2ef086a181f39e7aa08ea59358b3652afd4284bf3464ac SHA512 d9e12b0aaa5a71513fae05d54e6f0326082d0ebbae8c7c19cd0c1ffb4bc435af74bbc021d1533319bf9d8eaffd5b31abec3bb2ad19f927ea91c6c3a931da1664
-AUX CVE2008-4392_0002-dnscache-cache-soa-records-ipv6.patch 3043 BLAKE2B 224cf29a7db357c3c421212cc240c16801ea544e1cbad65605e0ba8413139c09d37144f2f784a751015abbb99c2f36e3716c28a821b8f66edf02310c72d28417 SHA512 f830bfd2fabd4d9b4e2649bcc4061d656d4645b93829415d070b26c6a22e8e17d941666b8e776947bf9a8ef93007f77d8be57fc9911dcc6dc2b7ac607d556ba0
AUX CVE2008-4392_0002-dnscache-cache-soa-records.patch 2944 BLAKE2B 22d0fa17c99e3b979faa3a1f1d7dae72834d47f8362efbe917f321847847147f3e7992599b27489a6ea898e1bcc0df5193f64202dc594e2840df6932dcc428d4 SHA512 f65ca7dfc8e85f469f22d72a1c79126c35243dc077abf4b688eb7d057f19456dc8a3665f558a8a3c1908f96fa1838792aa1bc317d2e89f4953020828c05926e6
AUX CVE2009-0858_0001-check-response-domain-name-length.patch 366 BLAKE2B 9f3b6644c0eba4d9df771f0bfcc80ab0d0b1768de75743ba0e5d6e55b90c3aaab38adaa2eaef6505d80b47bf8c0f63f282a76b384bae8194e65e8009985a7893 SHA512 aa5fe75be9db07b25e313145a209a06a05693141c1dd850987e80062e22014056e3055efee4d219475c9a51f25c04a7a46b3d7a2fb3976226e66585cef076f83
AUX CVE2012-1191_0001-ghost-domain-attack.patch 642 BLAKE2B 0d20b60b4f606a84f1006f426c3e1df8a83cb7e9e5804be38fec4d4b2c35a8e4932a7b941f5edaf4a4b5a559bbb09d595116b3fd841ad8f0a795a7c65f5759f8 SHA512 44e205b9a19dbbd405cb57b119f307e5bbdba8fa1124187b53848791c1538f7c01dab43cb34b9332d3258756eb3c0606d36e8b18adcff3c814f0f2cff4ec6822
AUX dnsroots.patch 296 BLAKE2B 8a4375b01aab95400dd85966b6b2ddaf5734307fa66710778d5e8a1d5cce4692baad16a2b6ce0a9a85b7fb90c56ca1ab964fa0d7b57e899616fee23aaeec1029 SHA512 2c745f2545d791ed6646406e749ef8e85c30b4546657ce241c413103e42cf3cfb5001c46481bd2966390563a9cc42e53e44519747350da2b8bb0fdf1d0f5c62e
AUX dnstracesort.patch 327 BLAKE2B 483b4a4407b3df88d91a3474a5ba29080d5e0f12c87f97052ce4dfa481f8bb3a3307c923c78f2664aa2154ca41c58c5d4159f8db81161c323198f8b177774bc1 SHA512 ae9cd51f24041aed135b5ba88d1efd0310b8095bccd6fb60a986756b460a4f98a93e163c3ddae7c146d56a9d41778d17449f772b91fdc58d9e69523cf6c2a6e9
-AUX headtail-r1.patch 1756 BLAKE2B 405d8100890e0b0f25c43f23e1caace5e70fbbfd96cd3a25044b78917c83b01e2605e6fd1c01fd3353ebbc2d21f0d8e60e9ceb77e4892ac397be94860e064f24 SHA512 be4c9aea40c737364a56f188ad2276d90deac0dffb73ba4b659490836c0fe92ffb65ccf23c6724b913b2d6354336727004be0cf5b43ebc47abe7004700dfe1e8
AUX increase-cname-recustion-depth.patch 1164 BLAKE2B 1bf7bc18ea55ac7aa4c1fe04d2345e7448bfd7f233938fbb1fcc95818cc1063493d2a4cb3c1519d7d4ea661844fbe80fbfc5ec0dc6e76ba3ccd0b4ea9d8f923e SHA512 a6ff23d44697ebe920bab7be58618f73dbbdd8cde4af4ac3e7455ee2b34a18f94cb2491b4b9ca306525aa5ee43e724f7b0ddddd58ac2702bd3cf75e0bb160431
-AUX makefile-parallel-test25.patch 2828 BLAKE2B f450c46bf2702e787a410400a3d448249d9ee915de9ba6d42f5174accf4fd4c62ee36a4a33c680878df21386a3a4c776f3b5897a178544bc9f21213ebfbebe8c SHA512 0bb89b7141f74906f4bebf5ccc46dad5a4f9147048bfebd78f84a10b0d09f20c75ddb5e935d3e26ba9ce4f51c30270140dd635ab9e8d5ffdfb2aed94399cbe71
AUX srv_record_support.patch 5423 BLAKE2B 28167fbf8b404b926e484a4cf93ddf4b1ff450be23dad032e91d286497d7eee06793d6161d9a242fbe315ff969398cc532df816b2ae4462108d67593d2b90bcc SHA512 2efedc7c7aaa209bb4a9d65ef1b28934d68c216fd428a27a099ba4801e8be04e1417bdbbf0077088264cd8bc3eb2441855c96890189d8d73804243e6ca4d0851
AUX string_length_255.patch 299 BLAKE2B 083d963d8d67baec402321c7fb8be2e485985ce03daea1d198912204dda6a90b794d5df3519b4177de8720122b46600cc9fe669f265cf9b81c75e4335ae081d6 SHA512 b451d23e1a45636dfae7cf69c64e3edde6b655bc0c7407586429e0d8282f17ef6215c6c33a6d238115c39d34fa57fa7699a7a10f146344c677fde10c0e207ac3
AUX tinydns-softlimit.patch 639 BLAKE2B 377c821ed8802d235f94823c7a702760c9b978e08a570d54b38e9a5fdb7c99f703aa1cd6ee4d55510a3ab5f7e0ae6397da1442313f4acc044bda2f124e0a8ef5 SHA512 85bb29517e35f0947fe680aaf07c93d16041ea64be94b8ea0313989ed716b2b19be267d5210ebaf89646452255b59a6d3fdeb80de4401c9942cb35d5957c0d9f
diff --git a/net-dns/djbdns/files/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries-ipv6-test28.patch b/net-dns/djbdns/files/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries-ipv6-test28.patch
deleted file mode 100644
index d493b8985e05..000000000000
--- a/net-dns/djbdns/files/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries-ipv6-test28.patch
+++ /dev/null
@@ -1,351 +0,0 @@
-diff --git a/Makefile b/Makefile
-index 5ccd647..eee09dd 100644
---- a/Makefile
-+++ b/Makefile
-@@ -346,11 +346,11 @@ stralloc.h iopause.h taia.h tai.h uint64.h taia.h
- ./compile dns_txt.c
-
- dnscache: \
--load dnscache.o droproot.o okclient.o log.o cache.o query.o \
-+load dnscache.o droproot.o okclient.o log.o cache.o query.o qmerge.o \
- response.o dd.o roots.o iopause.o prot.o dns.a env.a alloc.a buffer.a \
- libtai.a unix.a byte.a socket.lib
- ./load dnscache droproot.o okclient.o log.o cache.o \
-- query.o response.o dd.o roots.o iopause.o prot.o dns.a \
-+ query.o qmerge.o response.o dd.o roots.o iopause.o prot.o dns.a \
- env.a alloc.a buffer.a libtai.a unix.a byte.a `cat \
- socket.lib`
-
-@@ -371,7 +371,7 @@ compile dnscache.c env.h exit.h scan.h strerr.h error.h ip4.h \
- uint16.h uint64.h socket.h uint16.h dns.h stralloc.h gen_alloc.h \
- iopause.h taia.h tai.h uint64.h taia.h taia.h byte.h roots.h fmt.h \
- iopause.h query.h dns.h uint32.h alloc.h response.h uint32.h cache.h \
--uint32.h uint64.h ndelay.h log.h uint64.h okclient.h droproot.h
-+uint32.h uint64.h ndelay.h log.h uint64.h okclient.h droproot.h maxclient.h
- ./compile dnscache.c
-
- dnsfilter: \
-@@ -749,11 +749,16 @@ qlog.o: \
- compile qlog.c buffer.h qlog.h uint16.h
- ./compile qlog.c
-
-+qmerge.o: \
-+compile qmerge.c qmerge.h dns.h stralloc.h gen_alloc.h iopause.h \
-+taia.h tai.h uint64.h log.h maxclient.h
-+ ./compile qmerge.c
-+
- query.o: \
- compile query.c error.h roots.h log.h uint64.h case.h cache.h \
- uint32.h uint64.h byte.h dns.h stralloc.h gen_alloc.h iopause.h \
- taia.h tai.h uint64.h taia.h uint64.h uint32.h uint16.h dd.h alloc.h \
--response.h uint32.h query.h dns.h uint32.h
-+response.h uint32.h query.h dns.h uint32.h qmerge.h
- ./compile query.c
-
- random-ip: \
-diff --git a/dnscache.c b/dnscache.c
-index abcba69..c84e4b8 100644
---- a/dnscache.c
-+++ b/dnscache.c
-@@ -23,6 +23,7 @@
- #include "okclient.h"
- #include "droproot.h"
- #include "openreadclose.h"
-+#include "maxclient.h"
-
- long interface;
-
-@@ -59,7 +60,6 @@ uint64 numqueries = 0;
-
- static int udp53;
-
--#define MAXUDP 200
- static struct udpclient {
- struct query q;
- struct taia start;
-@@ -136,7 +136,6 @@ void u_new(void)
-
- static int tcp53;
-
--#define MAXTCP 20
- struct tcpclient {
- struct query q;
- struct taia start;
-diff --git a/log.c b/log.c
-index df465e2..1b0d98c 100644
---- a/log.c
-+++ b/log.c
-@@ -149,6 +149,13 @@ void log_tx(const char *q,const char qtype[2],const char *control,const char ser
- line();
- }
-
-+void log_tx_piggyback(const char *q, const char qtype[2], const char *control)
-+{
-+ string("txpb ");
-+ logtype(qtype); space(); name(q); space(); name(control);
-+ line();
-+}
-+
- void log_cachedanswer(const char *q,const char type[2])
- {
- string("cached "); logtype(type); space();
-diff --git a/log.h b/log.h
-index fe62fa3..d9a829b 100644
---- a/log.h
-+++ b/log.h
-@@ -18,6 +18,7 @@ extern void log_cachednxdomain(const char *);
- extern void log_cachedns(const char *,const char *);
-
- extern void log_tx(const char *,const char *,const char *,const char *,unsigned int);
-+extern void log_tx_piggyback(const char *,const char *,const char *);
-
- extern void log_nxdomain(const char *,const char *,unsigned int);
- extern void log_nodata(const char *,const char *,const char *,unsigned int);
-diff --git a/maxclient.h b/maxclient.h
-new file mode 100644
-index 0000000..e52fcd1
---- /dev/null
-+++ b/maxclient.h
-@@ -0,0 +1,7 @@
-+#ifndef MAXCLIENT_H
-+#define MAXCLIENT_H
-+
-+#define MAXUDP 200
-+#define MAXTCP 20
-+
-+#endif /* MAXCLIENT_H */
-diff --git a/qmerge.c b/qmerge.c
-new file mode 100644
-index 0000000..7c92299
---- /dev/null
-+++ b/qmerge.c
-@@ -0,0 +1,115 @@
-+#include "qmerge.h"
-+#include "byte.h"
-+#include "log.h"
-+#include "maxclient.h"
-+
-+#define QMERGE_MAX (MAXUDP+MAXTCP)
-+struct qmerge inprogress[QMERGE_MAX];
-+
-+static
-+int qmerge_key_init(struct qmerge_key *qmk, const char *q, const char qtype[2],
-+ const char *control)
-+{
-+ if (!dns_domain_copy(&qmk->q, q)) return 0;
-+ byte_copy(qmk->qtype, 2, qtype);
-+ if (!dns_domain_copy(&qmk->control, control)) return 0;
-+ return 1;
-+}
-+
-+static
-+int qmerge_key_equal(struct qmerge_key *a, struct qmerge_key *b)
-+{
-+ return
-+ byte_equal(a->qtype, 2, b->qtype) &&
-+ dns_domain_equal(a->q, b->q) &&
-+ dns_domain_equal(a->control, b->control);
-+}
-+
-+static
-+void qmerge_key_free(struct qmerge_key *qmk)
-+{
-+ dns_domain_free(&qmk->q);
-+ dns_domain_free(&qmk->control);
-+}
-+
-+void qmerge_free(struct qmerge **x)
-+{
-+ struct qmerge *qm;
-+
-+ qm = *x;
-+ *x = 0;
-+ if (!qm || !qm->active) return;
-+
-+ qm->active--;
-+ if (!qm->active) {
-+ qmerge_key_free(&qm->key);
-+ dns_transmit_free(&qm->dt);
-+ }
-+}
-+
-+int qmerge_start(struct qmerge **qm, const char servers[64], int flagrecursive,
-+ const char *q, const char qtype[2], const char localip[4],
-+ const char *control)
-+{
-+ struct qmerge_key k;
-+ int i;
-+ int r;
-+
-+ qmerge_free(qm);
-+
-+ byte_zero(&k, sizeof k);
-+ if (!qmerge_key_init(&k, q, qtype, control)) return -1;
-+ for (i = 0; i < QMERGE_MAX; i++) {
-+ if (!inprogress[i].active) continue;
-+ if (!qmerge_key_equal(&k, &inprogress[i].key)) continue;
-+ log_tx_piggyback(q, qtype, control);
-+ inprogress[i].active++;
-+ *qm = &inprogress[i];
-+ qmerge_key_free(&k);
-+ return 0;
-+ }
-+
-+ for (i = 0; i < QMERGE_MAX; i++)
-+ if (!inprogress[i].active)
-+ break;
-+ if (i == QMERGE_MAX) return -1;
-+
-+ log_tx(q, qtype, control, servers, 0);
-+ r = dns_transmit_start(&inprogress[i].dt, servers, flagrecursive, q, qtype, localip);
-+ if (r == -1) { qmerge_key_free(&k); return -1; }
-+ inprogress[i].active++;
-+ inprogress[i].state = 0;
-+ qmerge_key_free(&inprogress[i].key);
-+ byte_copy(&inprogress[i].key, sizeof k, &k);
-+ *qm = &inprogress[i];
-+ return 0;
-+}
-+
-+void qmerge_io(struct qmerge *qm, iopause_fd *io, struct taia *deadline)
-+{
-+ if (qm->state == 0) {
-+ dns_transmit_io(&qm->dt, io, deadline);
-+ qm->state = 1;
-+ }
-+ else {
-+ io->fd = -1;
-+ io->events = 0;
-+ }
-+}
-+
-+int qmerge_get(struct qmerge **x, const iopause_fd *io, const struct taia *when)
-+{
-+ int r;
-+ struct qmerge *qm;
-+
-+ qm = *x;
-+ if (qm->state == -1) return -1; /* previous error */
-+ if (qm->state == 0) return 0; /* no packet */
-+ if (qm->state == 2) return 1; /* already got packet */
-+
-+ r = dns_transmit_get(&qm->dt, io, when);
-+ if (r == -1) { qm->state = -1; return -1; } /* error */
-+ if (r == 0) { qm->state = 0; return 0; } /* must wait for i/o */
-+ if (r == 1) { qm->state = 2; return 1; } /* got packet */
-+ return -1; /* bug */
-+}
-diff --git a/qmerge.h b/qmerge.h
-new file mode 100644
-index 0000000..9a58157
---- /dev/null
-+++ b/qmerge.h
-@@ -0,0 +1,24 @@
-+#ifndef QMERGE_H
-+#define QMERGE_H
-+
-+#include "dns.h"
-+
-+struct qmerge_key {
-+ char *q;
-+ char qtype[2];
-+ char *control;
-+};
-+
-+struct qmerge {
-+ int active;
-+ struct qmerge_key key;
-+ struct dns_transmit dt;
-+ int state; /* -1 = error, 0 = need io, 1 = need get, 2 = got packet */
-+};
-+
-+extern int qmerge_start(struct qmerge **,const char *,int,const char *,const char *,const char *,const char *);
-+extern void qmerge_io(struct qmerge *,iopause_fd *,struct taia *);
-+extern int qmerge_get(struct qmerge **,const iopause_fd *,const struct taia *);
-+extern void qmerge_free(struct qmerge **);
-+
-+#endif /* QMERGE_H */
-diff --git a/query.c b/query.c
-index d61b20c..d9be8b8 100644
---- a/query.c
-+++ b/query.c
-@@ -84,7 +84,7 @@ static void cleanup(struct query *z)
- int j;
- int k;
-
-- dns_transmit_free(&z->dt);
-+ qmerge_free(&z->qm);
- for (j = 0;j < QUERY_MAXALIAS;++j)
- dns_domain_free(&z->alias[j]);
- for (j = 0;j < QUERY_MAXLEVEL;++j) {
-@@ -624,15 +624,9 @@ static int doit(struct query *z,int state)
- if (j == 256) goto SERVFAIL;
-
- dns_sortip6(z->servers[z->level],256);
-- if (z->level) {
-- dtype = z->ipv6[z->level] ? DNS_T_AAAA : DNS_T_A;
-- log_tx(z->name[z->level],dtype,z->control[z->level],z->servers[z->level],z->level);
-- if (dns_transmit_start(&z->dt,z->servers[z->level],flagforwardonly,z->name[z->level],dtype,z->localip) == -1) goto DIE;
-- }
-- else {
-- log_tx(z->name[0],z->type,z->control[0],z->servers[0],0);
-- if (dns_transmit_start(&z->dt,z->servers[0],flagforwardonly,z->name[0],z->type,z->localip) == -1) goto DIE;
-- }
-+ dtype = z->level ? (z->ipv6[z->level] ? DNS_T_AAAA : DNS_T_A) : z->type;
-+ if (qmerge_start(&z->qm,z->servers[z->level],flagforwardonly,z->name[z->level],dtype,z->localip,z->control[z->level]) == -1) goto DIE;
-+
- return 0;
-
-
-@@ -646,10 +640,10 @@ static int doit(struct query *z,int state)
-
- HAVEPACKET:
- if (++z->loop == 200) goto DIE;
-- buf = z->dt.packet;
-- len = z->dt.packetlen;
-+ buf = z->qm->dt.packet;
-+ len = z->qm->dt.packetlen;
-
-- whichserver = z->dt.servers + 16 * z->dt.curserver;
-+ whichserver = z->qm->dt.servers + 16 * z->qm->dt.curserver;
- control = z->control[z->level];
- d = z->name[z->level];
- /* dtype = z->level ? DNS_T_A : z->type; */
-@@ -1071,7 +1065,7 @@ int query_start(struct query *z,char *dn,char type[2],char class[2],char localip
-
- int query_get(struct query *z,iopause_fd *x,struct taia *stamp)
- {
-- switch(dns_transmit_get(&z->dt,x,stamp)) {
-+ switch(qmerge_get(&z->qm,x,stamp)) {
- case 1:
- return doit(z,1);
- case -1:
-@@ -1082,5 +1076,5 @@ int query_get(struct query *z,iopause_fd *x,struct taia *stamp)
-
- void query_io(struct query *z,iopause_fd *x,struct taia *deadline)
- {
-- dns_transmit_io(&z->dt,x,deadline);
-+ qmerge_io(z->qm,x,deadline);
- }
-diff --git a/query.h b/query.h
-index 61812aa..93a322e 100644
---- a/query.h
-+++ b/query.h
-@@ -1,7 +1,7 @@
- #ifndef QUERY_H
- #define QUERY_H
-
--#include "dns.h"
-+#include "qmerge.h"
- #include "uint32.h"
-
- #define QUERY_MAXLEVEL 5
-@@ -22,7 +22,7 @@ struct query {
- uint32 scope_id;
- char type[2];
- char class[2];
-- struct dns_transmit dt;
-+ struct qmerge *qm;
- } ;
-
- extern int query_start(struct query *,char *,char *,char *,char *,unsigned int);
diff --git a/net-dns/djbdns/files/CVE2008-4392_0002-dnscache-cache-soa-records-ipv6.patch b/net-dns/djbdns/files/CVE2008-4392_0002-dnscache-cache-soa-records-ipv6.patch
deleted file mode 100644
index d5b9c10d64d3..000000000000
--- a/net-dns/djbdns/files/CVE2008-4392_0002-dnscache-cache-soa-records-ipv6.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-diff -urNp a/query.c b/query.c
---- a/query.c 2009-03-19 11:35:28.452472164 -0700
-+++ b/query.c 2009-03-19 11:59:19.798221593 -0700
-@@ -476,6 +476,29 @@ static int doit(struct query *z,int stat
- }
- }
-
-+ if (typematch(DNS_T_SOA,dtype)) {
-+ byte_copy(key,2,DNS_T_SOA);
-+ cached = cache_get(key,dlen + 2,&cachedlen,&ttl);
-+ if (cached && (cachedlen || byte_diff(dtype,2,DNS_T_ANY))) {
-+ log_cachedanswer(d,DNS_T_SOA);
-+ if (!rqa(z)) goto DIE;
-+ pos = 0;
-+ while (pos = dns_packet_copy(cached,cachedlen,pos,misc,20)) {
-+ pos = dns_packet_getname(cached,cachedlen,pos,&t2);
-+ if (!pos) break;
-+ pos = dns_packet_getname(cached,cachedlen,pos,&t3);
-+ if (!pos) break;
-+ if (!response_rstart(d,DNS_T_SOA,ttl)) goto DIE;
-+ if (!response_addname(t2)) goto DIE;
-+ if (!response_addname(t3)) goto DIE;
-+ if (!response_addbytes(misc,20)) goto DIE;
-+ response_rfinish(RESPONSE_ANSWER);
-+ }
-+ cleanup(z);
-+ return 1;
-+ }
-+ }
-+
- if (typematch(DNS_T_A,dtype)) {
- byte_copy(key,2,DNS_T_A);
- cached = cache_get(key,dlen + 2,&cachedlen,&ttl);
-@@ -541,7 +564,7 @@ static int doit(struct query *z,int stat
- }
- }
-
-- if (!typematch(DNS_T_ANY,dtype) && !typematch(DNS_T_AXFR,dtype) && !typematch(DNS_T_CNAME,dtype) && !typematch(DNS_T_NS,dtype) && !typematch(DNS_T_PTR,dtype) && !typematch(DNS_T_A,dtype) && !typematch(DNS_T_MX,dtype) && !typematch(DNS_T_AAAA,dtype)) {
-+ if (!typematch(DNS_T_ANY,dtype) && !typematch(DNS_T_AXFR,dtype) && !typematch(DNS_T_CNAME,dtype) && !typematch(DNS_T_NS,dtype) && !typematch(DNS_T_PTR,dtype) && !typematch(DNS_T_A,dtype) && !typematch(DNS_T_MX,dtype) && !typematch(DNS_T_SOA,dtype) && !typematch(DNS_T_AAAA,dtype)) {
- byte_copy(key,2,dtype);
- cached = cache_get(key,dlen + 2,&cachedlen,&ttl);
- if (cached && (cachedlen || byte_diff(dtype,2,DNS_T_ANY))) {
-@@ -769,15 +792,24 @@ static int doit(struct query *z,int stat
- else if (byte_equal(type,2,DNS_T_AXFR))
- ;
- else if (byte_equal(type,2,DNS_T_SOA)) {
-+ int non_authority = 0;
-+ save_start();
- while (i < j) {
- pos = dns_packet_skipname(buf,len,records[i]); if (!pos) goto DIE;
- pos = dns_packet_getname(buf,len,pos + 10,&t2); if (!pos) goto DIE;
- pos = dns_packet_getname(buf,len,pos,&t3); if (!pos) goto DIE;
- pos = dns_packet_copy(buf,len,pos,misc,20); if (!pos) goto DIE;
-- if (records[i] < posauthority)
-+ if (records[i] < posauthority) {
- log_rrsoa(whichserver,t1,t2,t3,misc,ttl);
-+ save_data(misc,20);
-+ save_data(t2,dns_domain_length(t2));
-+ save_data(t3,dns_domain_length(t3));
-+ non_authority++;
-+ }
- ++i;
- }
-+ if (non_authority)
-+ save_finish(DNS_T_SOA,t1,ttl);
- }
- else if (byte_equal(type,2,DNS_T_CNAME)) {
- pos = dns_packet_skipname(buf,len,records[j - 1]); if (!pos) goto DIE;
diff --git a/net-dns/djbdns/files/headtail-r1.patch b/net-dns/djbdns/files/headtail-r1.patch
deleted file mode 100644
index 31854803ba89..000000000000
--- a/net-dns/djbdns/files/headtail-r1.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-diff -Naur /tmp/djbdns-1.05/Makefile djbdns-1.05/Makefile
---- a/Makefile 2003-11-16 20:33:41.000000000 +0100
-+++ b/Makefile 2003-11-16 20:35:15.000000000 +0100
-@@ -31,7 +31,7 @@
-
- auto_home.c: \
- auto-str conf-home
-- ./auto-str auto_home `head -1 conf-home` > auto_home.c
-+ ./auto-str auto_home `head -n 1 conf-home` > auto_home.c
-
- auto_home.o: \
- compile auto_home.c
-@@ -205,14 +205,14 @@
- choose: \
- warn-auto.sh choose.sh conf-home
- cat warn-auto.sh choose.sh \
-- | sed s}HOME}"`head -1 conf-home`"}g \
-+ | sed s}HOME}"`head -n 1 conf-home`"}g \
- > choose
- chmod 755 choose
-
- compile: \
- warn-auto.sh conf-cc
- ( cat warn-auto.sh; \
-- echo exec "`head -1 conf-cc`" '-c $${1+"$$@"}' \
-+ echo exec "`head -n 1 conf-cc`" '-c $${1+"$$@"}' \
- ) > compile
- chmod 755 compile
-
-@@ -449,7 +449,7 @@
- dnstracesort: \
- warn-auto.sh dnstracesort.sh conf-home
- cat warn-auto.sh dnstracesort.sh \
-- | sed s}HOME}"`head -1 conf-home`"}g \
-+ | sed s}HOME}"`head -n 1 conf-home`"}g \
- > dnstracesort
- chmod 755 dnstracesort
-
-@@ -570,7 +570,7 @@
- warn-auto.sh conf-ld
- ( cat warn-auto.sh; \
- echo 'main="$$1"; shift'; \
-- echo exec "`head -1 conf-ld`" \
-+ echo exec "`head -n 1 conf-ld`" \
- '-o "$$main" "$$main".o $${1+"$$@"}' \
- ) > load
- chmod 755 load
-@@ -758,7 +758,7 @@
- rts: \
- warn-auto.sh rts.sh conf-home
- cat warn-auto.sh rts.sh \
-- | sed s}HOME}"`head -1 conf-home`"}g \
-+ | sed s}HOME}"`head -n 1 conf-home`"}g \
- > rts
- chmod 755 rts
-
-@@ -901,8 +901,8 @@
- systype: \
- find-systype.sh conf-cc conf-ld trycpp.c x86cpuid.c
- ( cat warn-auto.sh; \
-- echo CC=\'`head -1 conf-cc`\'; \
-- echo LD=\'`head -1 conf-ld`\'; \
-+ echo CC=\'`head -n 1 conf-cc`\'; \
-+ echo LD=\'`head -n 1 conf-ld`\'; \
- cat find-systype.sh; \
- ) | sh > systype
-
diff --git a/net-dns/djbdns/files/makefile-parallel-test25.patch b/net-dns/djbdns/files/makefile-parallel-test25.patch
deleted file mode 100644
index 2754729acb97..000000000000
--- a/net-dns/djbdns/files/makefile-parallel-test25.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-diff --git a/Makefile b/Makefile
-index 9ebf4c8..fe5ed73 100644
---- a/Makefile
-+++ b/Makefile
-@@ -212,7 +212,7 @@ warn-auto.sh choose.sh conf-home
- chmod 755 choose
-
- clientloc.o: \
--compile clientloc.c open.h byte.h cdb.h ip6.h
-+compile clientloc.c open.h byte.h cdb.h uint32.h ip6.h
- ./compile clientloc.c
-
- compile: \
-@@ -336,7 +336,7 @@ taia.h tai.h uint64.h taia.h
-
- dns_transmit.o: \
- compile dns_transmit.c socket.h uint16.h alloc.h error.h byte.h \
--uint16.h dns.h stralloc.h gen_alloc.h iopause.h taia.h tai.h uint64.h \
-+uint32.h dns.h stralloc.h gen_alloc.h iopause.h taia.h tai.h uint64.h \
- taia.h
- ./compile dns_transmit.c
-
-@@ -859,15 +859,15 @@ trylsock.c compile load
- rm -f trylsock.o trylsock
-
- socket_accept.o: \
--compile socket_accept.c byte.h socket.h uint16.h
-+compile socket_accept.c byte.h socket.h uint16.h uint32.h
- ./compile socket_accept.c
-
- socket_accept6.o: \
--compile socket_accept6.c byte.h socket.h uint16.h
-+compile socket_accept6.c byte.h socket.h uint16.h uint32.h
- ./compile socket_accept6.c
-
- socket_bind.o: \
--compile socket_bind.c byte.h socket.h uint16.h
-+compile socket_bind.c byte.h socket.h uint16.h uint32.h
- ./compile socket_bind.c
-
- socket_bind6.o: \
-@@ -875,7 +875,7 @@ compile socket_bind6.c sockaddr_in6.h haveip6.h byte.h socket.h uint16.h uint32.
- ./compile socket_bind6.c
-
- socket_conn.o: \
--compile socket_conn.c byte.h socket.h uint16.h
-+compile socket_conn.c byte.h socket.h uint16.h uint32.h
- ./compile socket_conn.c
-
- socket_connect6.o: \
-@@ -883,11 +883,11 @@ compile socket_connect6.c byte.h socket.h uint16.h uint32.h
- ./compile socket_connect6.c
-
- socket_listen.o: \
--compile socket_listen.c socket.h uint16.h
-+compile socket_listen.c socket.h uint16.h uint32.h
- ./compile socket_listen.c
-
- socket_recv.o: \
--compile socket_recv.c byte.h socket.h uint16.h
-+compile socket_recv.c byte.h socket.h uint16.h uint32.h
- ./compile socket_recv.c
-
- socket_recv6.o: \
-@@ -895,7 +895,7 @@ compile socket_recv6.c sockaddr_in6.h haveip6.h byte.h socket.h uint16.h uint32.
- ./compile socket_recv6.c
-
- socket_send.o: \
--compile socket_send.c byte.h socket.h uint16.h
-+compile socket_send.c byte.h socket.h uint16.h uint32.h
- ./compile socket_send.c
-
- socket_send6.o: \
-@@ -903,7 +903,7 @@ compile socket_send6.c byte.h socket.h uint16.h uint32.h ip6.h haveip6.h error.h
- ./compile socket_send6.c
-
- socket_tcp.o: \
--compile socket_tcp.c ndelay.h socket.h uint16.h
-+compile socket_tcp.c ndelay.h socket.h uint16.h uint32.h
- ./compile socket_tcp.c
-
- socket_tcp6.o: \
-@@ -911,7 +911,7 @@ compile socket_tcp6.c ndelay.h socket.h uint16.h uint32.h haveip6.h
- ./compile socket_tcp6.c
-
- socket_udp.o: \
--compile socket_udp.c ndelay.h socket.h uint16.h
-+compile socket_udp.c ndelay.h socket.h uint16.h uint32.h
- ./compile socket_udp.c
-
- socket_udp6.o: \