summaryrefslogtreecommitdiff
path: root/net/djbdns
diff options
context:
space:
mode:
authorschmonz <schmonz@pkgsrc.org>2003-09-24 03:28:12 +0000
committerschmonz <schmonz@pkgsrc.org>2003-09-24 03:28:12 +0000
commit7028367739c6ef9acc58f4ebf76f4bb7ff4ea0e9 (patch)
tree5db98006a8580e51cc27533a4394f548b521ed22 /net/djbdns
parentca8937159937fb1f012f107f1b4095f6ba208704 (diff)
downloadpkgsrc-7028367739c6ef9acc58f4ebf76f4bb7ff4ea0e9.tar.gz
Add Russ Nelson's dnscache patch to ignore IP addresses listed in
root/ignoreip, in response to Verisign's latest silliness. The behavior of dnscache is unchanged unless you create this file. Bump PKGREVISION. While I'm here, change the "post-patch" target to "do-configure", since that's what it's doing. See <URL:http://tinydns.org/djbdns-1.05-ignoreip2.patch> for more information about this patch.
Diffstat (limited to 'net/djbdns')
-rw-r--r--net/djbdns/Makefile6
-rw-r--r--net/djbdns/distinfo4
-rw-r--r--net/djbdns/patches/patch-ac42
-rw-r--r--net/djbdns/patches/patch-ad31
4 files changed, 79 insertions, 4 deletions
diff --git a/net/djbdns/Makefile b/net/djbdns/Makefile
index 17e1fd64432..73373a2949e 100644
--- a/net/djbdns/Makefile
+++ b/net/djbdns/Makefile
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.26 2003/09/17 19:40:51 grant Exp $
+# $NetBSD: Makefile,v 1.27 2003/09/24 03:28:12 schmonz Exp $
# FreeBSD Id: ports/net/djbdns/Makefile,v 1.4 2000/09/28 18:18:41 nbm Exp
#
DISTNAME= djbdns-1.05
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= net
MASTER_SITES= http://cr.yp.to/djbdns/ \
ftp://cr.yp.to/djbdns/ \
@@ -45,7 +45,7 @@ post-extract:
@${CP} ${DISTDIR}/tinydns-log.pl.txt ${WRKSRC}/tinydns-log.pl
@${CP} ${DISTDIR}/dnscache-log.pl.txt ${WRKSRC}/dnscache-log.pl
-post-patch:
+do-configure:
${ECHO} ${CC} ${CFLAGS} > ${WRKSRC}/conf-cc
${ECHO} ${CC} ${_STRIPFLAG_CC} > ${WRKSRC}/conf-ld
${ECHO} ${PREFIX} > ${WRKSRC}/conf-home
diff --git a/net/djbdns/distinfo b/net/djbdns/distinfo
index f4a084e2204..944e781a5de 100644
--- a/net/djbdns/distinfo
+++ b/net/djbdns/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.7 2003/03/29 21:55:19 salo Exp $
+$NetBSD: distinfo,v 1.8 2003/09/24 03:28:13 schmonz Exp $
SHA1 (djbdns-1.05.tar.gz) = 2efdb3a039d0c548f40936aa9cb30829e0ce8c3d
Size (djbdns-1.05.tar.gz) = 85648 bytes
@@ -12,3 +12,5 @@ SHA1 (djbdns-1.05-ipv6.diff.bz2) = 225484ea34f8cdefa501e22640c67d093d2f5169
Size (djbdns-1.05-ipv6.diff.bz2) = 7306 bytes
SHA1 (patch-aa) = 9b16d6a7fc2aec2483ca4c90100dc4bae92392fc
SHA1 (patch-ab) = bd709644fbf55d67d5ad56beb5c545729432b727
+SHA1 (patch-ac) = 412a921af1bd0011c2355af648bcadc2645f9dcb
+SHA1 (patch-ad) = 85bf15f630c8c285175d490d9fe2ba8859279852
diff --git a/net/djbdns/patches/patch-ac b/net/djbdns/patches/patch-ac
new file mode 100644
index 00000000000..87a8cda5a03
--- /dev/null
+++ b/net/djbdns/patches/patch-ac
@@ -0,0 +1,42 @@
+$NetBSD: patch-ac,v 1.1 2003/09/24 03:28:14 schmonz Exp $
+
+--- dnscache.c.orig Sun Feb 11 16:11:45 2001
++++ dnscache.c
+@@ -23,6 +23,8 @@
+ #include "okclient.h"
+ #include "droproot.h"
+
++stralloc ignoreip = {0};
++
+ static int packetquery(char *buf,unsigned int len,char **q,char qtype[2],char qclass[2],char id[2])
+ {
+ unsigned int pos;
+@@ -389,6 +391,7 @@ char seed[128];
+ int main()
+ {
+ char *x;
++ unsigned int i, j, k;
+ unsigned long cachesize;
+
+ x = env_get("IP");
+@@ -430,6 +433,20 @@ int main()
+ scan_ulong(x,&cachesize);
+ if (!cache_init(cachesize))
+ strerr_die3x(111,FATAL,"not enough memory for cache of size ",x);
++
++ if (openreadclose("ignoreip",&ignoreip,64) < 0)
++ strerr_die2x(111,FATAL,"trouble reading ignoreip");
++ for(j = k = i = 0; i < ignoreip.len; i++)
++ if (ignoreip.s[i] == '\n') {
++ ignoreip.s[i] = '\0';
++ if (j + 4 > i)
++ strerr_die3x(111,FATAL,"badly malformed ip4 address ",ignoreip.s+k);
++ if (!ip4_scan(ignoreip.s+k,ignoreip.s+j))
++ strerr_die3x(111,FATAL,"unable to parse address in ignoreip ",ignoreip.s+k);
++ j += 4;
++ k = i + 1;
++ }
++ ignoreip.len = j;
+
+ if (env_get("HIDETTL"))
+ response_hidettl();
diff --git a/net/djbdns/patches/patch-ad b/net/djbdns/patches/patch-ad
new file mode 100644
index 00000000000..8068b8d283b
--- /dev/null
+++ b/net/djbdns/patches/patch-ad
@@ -0,0 +1,31 @@
+$NetBSD: patch-ad,v 1.1 2003/09/24 03:28:14 schmonz Exp $
+
+--- query.c.orig Wed Sep 17 11:42:42 2003
++++ query.c
+@@ -13,6 +13,8 @@
+ #include "response.h"
+ #include "query.h"
+
++extern stralloc ignoreip;
++
+ static int flagforwardonly = 0;
+
+ void query_forwardonly(void)
+@@ -193,6 +195,7 @@ static int doit(struct query *z,int stat
+ int k;
+ int p;
+ int q;
++ unsigned int ii;
+
+ errno = error_io;
+ if (state == 1) goto HAVEPACKET;
+@@ -795,6 +798,9 @@ static int doit(struct query *z,int stat
+ pos = dns_packet_copy(buf,len,pos,header,10); if (!pos) goto DIE;
+ if (byte_equal(header + 8,2,"\0\4")) {
+ pos = dns_packet_copy(buf,len,pos,header,4); if (!pos) goto DIE;
++ if (ignoreip.len)
++ for(ii = 0; ii < ignoreip.len; ii+= 4)
++ if (byte_equal(header,4,ignoreip.s+ii)) goto NXDOMAIN;
+ save_data(header,4);
+ log_rr(whichserver,t1,DNS_T_A,header,4,ttl);
+ }