summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authortron <tron@pkgsrc.org>2005-02-24 15:49:26 +0000
committertron <tron@pkgsrc.org>2005-02-24 15:49:26 +0000
commit0ce48af7493e4aeaee3475acad011e1e85904d49 (patch)
tree5fe48adddd7277c7519b5472552d592e778bdf80 /net
parent43a9a97709a2b051de00bcbf88ec11a9fdb83a16 (diff)
downloadpkgsrc-0ce48af7493e4aeaee3475acad011e1e85904d49.tar.gz
Fix lookup of TCP IPv6 connections on NetBSD 1.6Y and newer. Based on a
patch supplied by Hans Rosenfeld in PR pkg/29517. Bump package revision.
Diffstat (limited to 'net')
-rw-r--r--net/oidentd/Makefile4
-rw-r--r--net/oidentd/distinfo4
-rw-r--r--net/oidentd/patches/patch-ac98
3 files changed, 91 insertions, 15 deletions
diff --git a/net/oidentd/Makefile b/net/oidentd/Makefile
index 43bd877e83d..0620ecb35bc 100644
--- a/net/oidentd/Makefile
+++ b/net/oidentd/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.4 2004/12/28 02:47:47 reed Exp $
+# $NetBSD: Makefile,v 1.5 2005/02/24 15:49:26 tron Exp $
DISTNAME= oidentd-2.0.7
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=ojnk/}
diff --git a/net/oidentd/distinfo b/net/oidentd/distinfo
index 8e0359d1e1f..0abdeb94f54 100644
--- a/net/oidentd/distinfo
+++ b/net/oidentd/distinfo
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.5 2005/02/24 12:13:57 agc Exp $
+$NetBSD: distinfo,v 1.6 2005/02/24 15:49:26 tron Exp $
SHA1 (oidentd-2.0.7.tar.gz) = c973b436e6f8cab87b5e2f557e901722e27f1e79
RMD160 (oidentd-2.0.7.tar.gz) = 91c2d24f8a1b37bd6feffd4243b0311f76e7aff3
Size (oidentd-2.0.7.tar.gz) = 196027 bytes
SHA1 (patch-aa) = b5c82f425fc9f5174dd4efb4c4d13bdf78486beb
SHA1 (patch-ab) = 264178c5cc79c744354ab228678cb41bdc27b198
-SHA1 (patch-ac) = 8a5362a2ea62f825e356aeb46697d09aa77110f1
+SHA1 (patch-ac) = 6c7cfa9eadc3f6b84ce8dc39edf67d665b8d0dc7
diff --git a/net/oidentd/patches/patch-ac b/net/oidentd/patches/patch-ac
index 770e2a32cf2..ba93e08de43 100644
--- a/net/oidentd/patches/patch-ac
+++ b/net/oidentd/patches/patch-ac
@@ -1,7 +1,7 @@
-$NetBSD: patch-ac,v 1.3 2004/01/04 12:59:40 tron Exp $
+$NetBSD: patch-ac,v 1.4 2005/02/24 15:49:26 tron Exp $
---- src/kernel/netbsd.c.orig 2003-02-12 03:15:59.000000000 +0100
-+++ src/kernel/netbsd.c 2004-01-04 13:57:58.000000000 +0100
+--- src/kernel/netbsd.c.orig 2003-02-12 02:15:59.000000000 +0000
++++ src/kernel/netbsd.c 2005-02-24 15:40:54.000000000 +0000
@@ -29,6 +29,7 @@
#include <errno.h>
#include <string.h>
@@ -10,7 +10,19 @@ $NetBSD: patch-ac,v 1.3 2004/01/04 12:59:40 tron Exp $
#include <sys/socket.h>
#include <sys/socketvar.h>
#include <netinet/in.h>
-@@ -162,7 +163,7 @@
+@@ -99,7 +100,11 @@
+ kinfo->nl[N_TCB].n_name = "_tcbtable";
+
+ #ifdef WANT_IPV6
++#if __NetBSD_Version__ >= 106250000 /* 1.6Y */
++ kinfo->nl[N_TCB6].n_name = "_tcbtable";
++#else
+ kinfo->nl[N_TCB6].n_name = "_tcb6";
++#endif
+ #else
+ kinfo->nl[N_TCB6].n_name = "_oidentd_nonexistent";
+ #endif
+@@ -162,7 +167,7 @@
if (tcbtablep == NULL)
return (NULL);
@@ -19,7 +31,7 @@ $NetBSD: patch-ac,v 1.3 2004/01/04 12:59:40 tron Exp $
while (kpcbp != (struct inpcb *) ktcbtablep) {
if (getbuf((u_long) kpcbp, &pcb, sizeof(struct inpcb)) == -1)
break;
-@@ -185,7 +186,7 @@
+@@ -185,7 +190,7 @@
return (pcb.inp_socket);
}
@@ -28,15 +40,79 @@ $NetBSD: patch-ac,v 1.3 2004/01/04 12:59:40 tron Exp $
}
return (NULL);
-@@ -351,7 +352,11 @@
- return (tcb6_temp.in6p_socket);
- }
+@@ -327,12 +332,38 @@
+ ** Returns NULL if no match.
+ */
-+#if defined(__NetBSD__) && __NetBSD_Version__ >= 106250000 /* 1.6Y */
-+ tcb6_cur = (struct in6pcb *) tcb6_temp.in6p_queue.cqe_next;
++#if __NetBSD_Version__ >= 106250000
++static struct socket *getlist6( struct inpcbtable *tcbtablep,
++ struct inpcbtable *ktcbtablep,
+#else
- tcb6_cur = tcb6_temp.in6p_next;
+ static struct socket *getlist6( struct in6pcb *tcb6,
+#endif
+ in_port_t lport,
+ in_port_t fport,
+ const struct in6_addr *laddr,
+ const struct in6_addr *faddr)
+ {
++#if __NetBSD_Version__ >= 106250000
++ struct in6pcb *kpcbp, pcb;
++
++ if (tcbtablep == NULL)
++ return (NULL);
++
++ kpcbp = (struct in6pcb *) tcbtablep->inpt_queue.cqh_first;
++ while (kpcbp != (struct in6pcb *) ktcbtablep) {
++ if (getbuf((u_long) kpcbp, &pcb, sizeof(struct in6pcb)) == -1)
++ break;
++ if (pcb.in6p_fport == fport &&
++ pcb.in6p_lport == lport &&
++ IN6_ARE_ADDR_EQUAL(&pcb.in6p_laddr, laddr) &&
++ IN6_ARE_ADDR_EQUAL(&pcb.in6p_faddr, faddr))
++ {
++ return (pcb.in6p_socket);
++ }
++
++ kpcbp = (struct in6pcb *) pcb.in6p_queue.cqe_next;
++ }
++#else
+ struct in6pcb *tcb6_cur, tcb6_temp;
+
+ if (tcb6 == NULL)
+@@ -355,7 +386,7 @@
if (getbuf((u_long) tcb6_cur, &tcb6_temp, sizeof(tcb6_temp)) == -1)
break;
} while ((u_long) tcb6_cur != kinfo->nl[N_TCB6].n_value);
+-
++#endif
+ return (NULL);
+ }
+
+@@ -368,6 +399,19 @@
+ struct sockaddr_storage *laddr,
+ struct sockaddr_storage *faddr)
+ {
++#if __NetBSD_Version__ >= 106250000 /* 1.6Y */
++ struct socket *sockp, sock;
++ struct inpcbtable tcbtable;
++ int ret;
++
++ ret = getbuf(kinfo->nl[N_TCB6].n_value, &tcbtable, sizeof(tcbtable));
++ if (ret == -1)
++ return (-1);
++
++ sockp = getlist6(&tcbtable,
++ (struct inpcbtable *) kinfo->nl[N_TCB6].n_value,
++ lport, fport, &SIN6(laddr)->sin6_addr, &SIN6(faddr)->sin6_addr);
++#else
+ struct socket *sockp, sock;
+ struct in6pcb tcb6;
+ int ret;
+@@ -378,6 +422,7 @@
+
+ sockp = getlist6(&tcb6, lport, fport,
+ &SIN6(laddr)->sin6_addr, &SIN6(faddr)->sin6_addr);
++#endif
+
+ if (sockp == NULL)
+ return (-1);