pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/www/analog Teach "analog" about IPv6 addresses in webs...
details: https://anonhg.NetBSD.org/pkgsrc/rev/5d9bf1fdcbd8
branches: trunk
changeset: 529253:5d9bf1fdcbd8
user: tron <tron%pkgsrc.org@localhost>
date: Tue May 29 09:03:12 2007 +0000
description:
Teach "analog" about IPv6 addresses in webserver logfiles.
Bump package revision because of this new feature.
diffstat:
www/analog/Makefile | 3 +-
www/analog/distinfo | 3 +-
www/analog/patches/patch-ac | 74 +++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 78 insertions(+), 2 deletions(-)
diffs (103 lines):
diff -r f30a7d36bfaf -r 5d9bf1fdcbd8 www/analog/Makefile
--- a/www/analog/Makefile Tue May 29 08:41:29 2007 +0000
+++ b/www/analog/Makefile Tue May 29 09:03:12 2007 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.55 2007/02/22 19:27:18 wiz Exp $
+# $NetBSD: Makefile,v 1.56 2007/05/29 09:03:12 tron Exp $
DISTNAME= analog-6.0
+PKGREVISION= 1
CATEGORIES= www
MASTER_SITES= ${HOMEPAGE} \
http://www.web42.com/analog/ \
diff -r f30a7d36bfaf -r 5d9bf1fdcbd8 www/analog/distinfo
--- a/www/analog/distinfo Tue May 29 08:41:29 2007 +0000
+++ b/www/analog/distinfo Tue May 29 09:03:12 2007 +0000
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.21 2005/08/25 10:09:48 grant Exp $
+$NetBSD: distinfo,v 1.22 2007/05/29 09:03:13 tron Exp $
SHA1 (analog-6.0.tar.gz) = 17ad601f84e73c940883fb9b9e805879aac37493
RMD160 (analog-6.0.tar.gz) = 75c6157d2ac1459ee28a90001787382f5b671dca
Size (analog-6.0.tar.gz) = 1553316 bytes
SHA1 (patch-aa) = dc65dc097131572251f6e1490e3336c21ee53ee7
SHA1 (patch-ab) = e59f91bedf08f4ece6b36ee06bc8d7d7742948c4
+SHA1 (patch-ac) = 590016795c621ce76b84f7c17a91d36f8a980e50
diff -r f30a7d36bfaf -r 5d9bf1fdcbd8 www/analog/patches/patch-ac
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/www/analog/patches/patch-ac Tue May 29 09:03:12 2007 +0000
@@ -0,0 +1,74 @@
+$NetBSD: patch-ac,v 1.5 2007/05/29 09:03:13 tron Exp $
+
+--- alias.c.orig 2004-12-19 13:51:30.000000000 +0000
++++ alias.c 2007-05-29 08:58:48.000000000 +0100
+@@ -13,6 +13,10 @@
+
+ #include "anlghea3.h"
+
++#if defined(NI_MAXHOST) && defined(AI_NUMERICHOST) && defined(NI_NAMEREQD)
++#define IPV6 1
++#endif
++
+ /* Throughout this file, to avoid a buffer overflow, we must be careful when we
+ do any operation which can increase the length of the name. Such operations
+ are thankfully rare, except for user aliases in wildalias().
+@@ -213,7 +217,12 @@
+ /* DNS lookup */
+
+ #ifndef NODNS
++#ifdef IPV6
++ if (dnslevel != DNS_NONE &&
++ (ISDIGIT(name[len]) || strchr(name, ':') != NULL)) {
++#else
+ if (dnslevel != DNS_NONE && ISDIGIT(name[len])) {
++#endif
+ do_dns(name, NULL, dnslevel);
+ len = (int)strlen(name) - 1;
+ }
+@@ -605,6 +614,37 @@
+ done = IpAddr2Name(name);
+ /* Doesn't currently include code to use SIGALRM */
+ #else
++#ifdef IPV6
++ struct addrinfo hints, *res;
++ char host[NI_MAXHOST];
++
++ memset(&hints, 0, sizeof(hints));
++ hints.ai_flags = AI_NUMERICHOST;
++ res = NULL;
++#ifndef NOALARM
++ if (SETJMP(jumpbuf))
++ signal(SIGALRM, SIG_DFL);
++ /* reset to default handling in case SIGALRM is raised exogenously */
++ else {
++ signal(SIGALRM, sighandler);
++ alarm(dnstimeout);
++#endif
++ if (getaddrinfo(name, NULL, &hints, &res) == 0 && res != NULL) {
++ if (res->ai_addr != NULL && res->ai_addrlen > 0 &&
++ getnameinfo(res->ai_addr, res->ai_addrlen, host, sizeof(host),
++ NULL, 0, NI_NAMEREQD) == 0) {
++ strncpy(name, host, BLOCKSIZE - 1);
++ name[BLOCKSIZE - 1] = '\0';
++ done = TRUE;
++ }
++ freeaddrinfo(res);
++ }
++#ifndef NOALARM
++ alarm(0);
++ signal(SIGALRM, SIG_DFL);
++ }
++#endif
++#else
+ addr = inet_addr(name);
+ if (addr != INET_ADDR_ERR) {
+ addrp = (char *) &addr;
+@@ -631,6 +671,7 @@
+ }
+ #endif
+ }
++#endif /* not IPV6 */
+ #endif /* not MAC */
+ if (done)
+ debug('D', " resolved to %s", name);
Home |
Main Index |
Thread Index |
Old Index