aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrion <krion@FreeBSD.org>2004-04-14 16:33:08 +0800
committerkrion <krion@FreeBSD.org>2004-04-14 16:33:08 +0800
commit4eb7aeb08f0bf2e3d40875fd4e3957ccc22ca7b8 (patch)
treee1d681b6bed07ced88921bdaa0f006025abb03ec
parent9b88a53c13de7d1d06a0a1eb281e665e65ccd0e7 (diff)
downloadfreebsd-ports-gnome-4eb7aeb08f0bf2e3d40875fd4e3957ccc22ca7b8.tar.gz
freebsd-ports-gnome-4eb7aeb08f0bf2e3d40875fd4e3957ccc22ca7b8.tar.zst
freebsd-ports-gnome-4eb7aeb08f0bf2e3d40875fd4e3957ccc22ca7b8.zip
- Fix DNS resolution bug
PR: ports/65501 Submitted by: maintainer
-rw-r--r--net-mgmt/arpwatch-devel/Makefile2
-rw-r--r--net-mgmt/arpwatch-devel/files/patch-ai15
-rw-r--r--net-mgmt/arpwatch-devel/files/patch-an8
-rw-r--r--net-mgmt/arpwatch-devel/files/patch-ar33
4 files changed, 49 insertions, 9 deletions
diff --git a/net-mgmt/arpwatch-devel/Makefile b/net-mgmt/arpwatch-devel/Makefile
index 58a9e2cfe7fa..b5b4c0e82441 100644
--- a/net-mgmt/arpwatch-devel/Makefile
+++ b/net-mgmt/arpwatch-devel/Makefile
@@ -7,7 +7,7 @@
PORTNAME= arpwatch
PORTVERSION= 2.1.a11
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net-mgmt
MASTER_SITES= http://www.Awfulhak.org/arpwatch/ \
ftp://ftp.ee.lbl.gov/
diff --git a/net-mgmt/arpwatch-devel/files/patch-ai b/net-mgmt/arpwatch-devel/files/patch-ai
index e22dcf9e63f6..32f43e5e2e8a 100644
--- a/net-mgmt/arpwatch-devel/files/patch-ai
+++ b/net-mgmt/arpwatch-devel/files/patch-ai
@@ -1,5 +1,5 @@
--- db.c.orig Sat Sep 30 19:39:58 2000
-+++ db.c Mon Mar 29 14:26:14 2004
++++ db.c Tue Apr 13 14:39:50 2004
@@ -41,6 +41,7 @@
#include <string.h>
#include <syslog.h>
@@ -75,7 +75,7 @@
+ BCOPY(e, ep->e, sizeof(ep->e));
+ if (h == NULL)
+ h = getsname(a);
-+ if (h != NULL && !isdigit((int)*h))
++ if (h != NULL)
+ strncpy(ep->h, h, sizeof(ep->h));
+ ep->t = t;
+ strncpy(ep->iface, interface, sizeof(ep->iface));
@@ -249,8 +249,9 @@
+ BCOPY(e, ep->e, sizeof(ep->e));
if (h == NULL && !initializing)
h = getsname(a);
- if (h != NULL && !isdigit((int)*h))
+- if (h != NULL && !isdigit((int)*h))
- strcpy(ep->h, h);
++ if (h != NULL)
+ strncpy(ep->h, h, sizeof(ep->h));
ep->t = t;
+
@@ -260,8 +261,12 @@
return (ep);
}
-@@ -304,7 +377,7 @@
- if (!isdigit((int)*h) && strcmp(h, ep->h) != 0) {
+@@ -301,10 +374,10 @@
+ return;
+ ep = ap->elist[0];
+ h = getsname(ap->a);
+- if (!isdigit((int)*h) && strcmp(h, ep->h) != 0) {
++ if (h != NULL && strcmp(h, ep->h) != 0) {
syslog(LOG_INFO, "hostname changed %s %s %s -> %s",
intoa(ap->a), e2str(ep->e), ep->h, h);
- strcpy(ep->h, h);
diff --git a/net-mgmt/arpwatch-devel/files/patch-an b/net-mgmt/arpwatch-devel/files/patch-an
index 623d34853af5..e6f6fad52dfa 100644
--- a/net-mgmt/arpwatch-devel/files/patch-an
+++ b/net-mgmt/arpwatch-devel/files/patch-an
@@ -1,5 +1,5 @@
--- report.c.orig Sat Sep 30 19:41:10 2000
-+++ report.c Mon Mar 29 14:24:36 2004
++++ report.c Tue Apr 13 14:39:50 2004
@@ -45,6 +45,8 @@
#include <ctype.h>
@@ -64,11 +64,13 @@
/* Update child depth */
++cdepth;
-@@ -304,12 +315,31 @@
+@@ -303,13 +314,32 @@
+ (void)fprintf(f, "From: %s\n", watchee);
(void)fprintf(f, "To: %s\n", watcher);
hn = gethname(a);
- if (!isdigit(*hn))
+- if (!isdigit(*hn))
- (void)fprintf(f, "Subject: %s (%s)\n", title, hn);
++ if (hn != NULL)
+ (void)fprintf(f, "Subject: Arpwatch Event (%s)\n", hn);
else {
- (void)fprintf(f, "Subject: %s\n", title);
diff --git a/net-mgmt/arpwatch-devel/files/patch-ar b/net-mgmt/arpwatch-devel/files/patch-ar
new file mode 100644
index 000000000000..222fcdefe2f1
--- /dev/null
+++ b/net-mgmt/arpwatch-devel/files/patch-ar
@@ -0,0 +1,33 @@
+--- dns.c.orig Fri Oct 13 21:50:52 2000
++++ dns.c Tue Apr 13 14:39:50 2004
+@@ -137,7 +137,7 @@
+ return (0);
+ }
+
+-/* Return the cannonical name of the host */
++/* Return the canonical name of the host (NULL if not found) */
+ char *
+ gethname(u_int32_t a)
+ {
+@@ -150,18 +150,18 @@
+ hp = gethostbyaddr((char *)&a, sizeof(a), AF_INET);
+ _res.options = options;
+ if (hp == NULL)
+- return (intoa(a));
++ return NULL;
+ return (hp->h_name);
+ }
+
+-/* Return the simple name of the host */
++/* Return the simple name of the host (NULL if not found) */
+ char *
+ getsname(register u_int32_t a)
+ {
+ register char *s, *cp;
+
+ s = gethname(a);
+- if (!isdigit((int)*s)) {
++ if (s != NULL) {
+ cp = strchr(s, '.');
+ if (cp != NULL)
+ *cp = '\0';