summaryrefslogtreecommitdiff
path: root/net/mtr
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2005-02-01 17:02:00 +0000
committerwiz <wiz@pkgsrc.org>2005-02-01 17:02:00 +0000
commit189e4462bd73d6c8db224eac14c10f7666f64b61 (patch)
tree4fc5665e102dabf1ee7b043b97949054ff46c4ae /net/mtr
parent241c6c2aa86f6b1dd06206dcfc0d43e44722cea4 (diff)
downloadpkgsrc-189e4462bd73d6c8db224eac14c10f7666f64b61.tar.gz
Add patch based on christos' etherape patch-ab to make name lookups work
on -current. Bump PKGREVISION.
Diffstat (limited to 'net/mtr')
-rw-r--r--net/mtr/Makefile3
-rw-r--r--net/mtr/distinfo4
-rw-r--r--net/mtr/patches/patch-ab83
3 files changed, 80 insertions, 10 deletions
diff --git a/net/mtr/Makefile b/net/mtr/Makefile
index 44690347bb6..72bdc2c50ad 100644
--- a/net/mtr/Makefile
+++ b/net/mtr/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.38 2004/12/25 21:24:45 wiz Exp $
+# $NetBSD: Makefile,v 1.39 2005/02/01 17:02:00 wiz Exp $
#
DISTNAME= mtr-0.67
+PKGREVISION= 1
CATEGORIES= net
MASTER_SITES= ftp://ftp.bitwizard.nl/mtr/
diff --git a/net/mtr/distinfo b/net/mtr/distinfo
index 1e4998a8f04..8c787fe504c 100644
--- a/net/mtr/distinfo
+++ b/net/mtr/distinfo
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.13 2005/02/01 16:53:58 wiz Exp $
+$NetBSD: distinfo,v 1.14 2005/02/01 17:02:00 wiz Exp $
SHA1 (mtr-0.67.tar.gz) = 23fe652ebe25fe86fcb421e78eb76917248b9c94
Size (mtr-0.67.tar.gz) = 131393 bytes
SHA1 (patch-aa) = eb1998efc2a5b455461333382c34ed9c77cf76ef
-SHA1 (patch-ab) = d949475cf8beeb4972a35f4139689fde9781e88f
+SHA1 (patch-ab) = cfddf96d24c734990a15beec796b6bbbf7cb3b9d
SHA1 (patch-ad) = 91788870a4375fc622f512b5823202e7084f4c2e
SHA1 (patch-ae) = ccc70fa482a8b8d4ab3124558e6586254a8c36bf
diff --git a/net/mtr/patches/patch-ab b/net/mtr/patches/patch-ab
index 25bf03dc6a4..f88905302bd 100644
--- a/net/mtr/patches/patch-ab
+++ b/net/mtr/patches/patch-ab
@@ -1,12 +1,11 @@
-$NetBSD: patch-ab,v 1.7 2005/02/01 16:53:58 wiz Exp $
+$NetBSD: patch-ab,v 1.8 2005/02/01 17:02:00 wiz Exp $
---- dns.c.orig Thu Aug 26 00:56:53 2004
-+++ dns.c Sun Jan 9 16:06:08 2005
-@@ -32,9 +32,18 @@
+--- dns.c.orig 2004-08-26 09:56:53.000000000 +0200
++++ dns.c
+@@ -32,9 +32,17 @@
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
-+
+#ifdef __APPLE__
+#include <arpa/nameser8_compat.h>
+#else
@@ -21,7 +20,45 @@ $NetBSD: patch-ab,v 1.7 2005/02/01 16:53:58 wiz Exp $
#include <unistd.h>
#include <fcntl.h>
#include <ctype.h>
-@@ -814,9 +823,9 @@
+@@ -282,6 +290,17 @@ char nullstring[] = "";
+
+ int use_dns = 1;
+
++#ifdef res_ninit
++#define RES_INIT() res_ninit(&myres);
++#define RES_MKQUERY(a, b, c, d, e, f, g, h, i) \
++ res_nmkquery(&myres, a, b, c, d, e, f, g, h, i)
++struct __res_state myres;
++#else
++#define RES_INIT() res_init();
++#define RES_MKQUERY(a, b, c, d, e, f, g, h, i) \
++ res_mkquery(a, b, c, d, e, f, g, h, i)
++#define myres _res
++#endif
+
+ /* Code */
+ #ifdef CorruptCheck
+@@ -448,14 +467,14 @@ void dns_open(void)
+ {
+ int option,i;
+
+- res_init();
+- if (!_res.nscount) {
++ RES_INIT();
++ if (!myres.nscount) {
+ fprintf(stderr,"No nameservers defined.\n");
+ exit(-1);
+ }
+- _res.options|= RES_RECURSE | RES_DEFNAMES | RES_DNSRCH;
+- for (i = 0;i < _res.nscount;i++)
+- _res.nsaddr_list[i].sin_family = AF_INET;
++ myres.options|= RES_RECURSE | RES_DEFNAMES | RES_DNSRCH;
++ for (i = 0;i < myres.nscount;i++)
++ myres.nsaddr_list[i].sin_family = AF_INET;
+ resfd = socket(AF_INET, SOCK_DGRAM, 0);
+ if (resfd == -1) {
+ fprintf(stderr,"Unable to allocate socket for nameserver communication: %s\n",
+@@ -814,17 +833,17 @@ void dorequest(char *s,int type,word id)
{
packetheader *hp;
int r,i;
@@ -29,7 +66,39 @@ $NetBSD: patch-ab,v 1.7 2005/02/01 16:53:58 wiz Exp $
+ unsigned char buf[MaxPacketsize];
- r = res_mkquery(QUERY,s,C_IN,type,NULL,0,NULL,(unsigned char*)buf,MaxPacketsize);
-+ r = res_mkquery(QUERY,s,C_IN,type,NULL,0,NULL,buf,MaxPacketsize);
++ r = RES_MKQUERY(QUERY,s,C_IN,type,NULL,0,NULL,(unsigned char*)buf,MaxPacketsize);
if (r == -1) {
restell("Resolver error: Query too large.");
return;
+ }
+ hp = (packetheader *)buf;
+ hp->id = id; /* htons() deliberately left out (redundant) */
+- for (i = 0;i < _res.nscount;i++)
+- (void)sendto(resfd,buf,r,0,(struct sockaddr *)&_res.nsaddr_list[i],
++ for (i = 0;i < myres.nscount;i++)
++ (void)sendto(resfd,buf,r,0,(struct sockaddr *)&myres.nsaddr_list[i],
+ sizeof(struct sockaddr));
+ }
+
+@@ -1161,15 +1180,15 @@ void dns_ack(void)
+ if (r > 0) {
+ /* Check to see if this server is actually one we sent to */
+ if (from.sin_addr.s_addr == localhost) {
+- for (i = 0;i < _res.nscount;i++)
+- if ((_res.nsaddr_list[i].sin_addr.s_addr == from.sin_addr.s_addr) ||
+- (!_res.nsaddr_list[i].sin_addr.s_addr)) /* 0.0.0.0 replies as 127.0.0.1 */
++ for (i = 0;i < myres.nscount;i++)
++ if ((myres.nsaddr_list[i].sin_addr.s_addr == from.sin_addr.s_addr) ||
++ (!myres.nsaddr_list[i].sin_addr.s_addr)) /* 0.0.0.0 replies as 127.0.0.1 */
+ break;
+ } else
+- for (i = 0;i < _res.nscount;i++)
+- if (_res.nsaddr_list[i].sin_addr.s_addr == from.sin_addr.s_addr)
++ for (i = 0;i < myres.nscount;i++)
++ if (myres.nsaddr_list[i].sin_addr.s_addr == from.sin_addr.s_addr)
+ break;
+- if (i == _res.nscount) {
++ if (i == myres.nscount) {
+ sprintf(tempstring,"Resolver error: Received reply from unknown source: %s",
+ inet_ntoa(from.sin_addr));
+ restell(tempstring);