pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/net/mDNSResponder -enable ipv6
details: https://anonhg.NetBSD.org/pkgsrc/rev/d139d9f0a462
branches: trunk
changeset: 515955:d139d9f0a462
user: drochner <drochner%pkgsrc.org@localhost>
date: Tue Jul 11 14:39:29 2006 +0000
description:
-enable ipv6
-fix some RFC2292 vs 3542 confusion which made the former fail
-on NetBSD, build a HINFO record from hw.model and kern.osrelease
-bump PKGREVISION
diffstat:
net/mDNSResponder/Makefile | 8 +++-
net/mDNSResponder/distinfo | 3 +-
net/mDNSResponder/patches/patch-ab | 82 ++++++++++++++++++++++++++++++++++++++
3 files changed, 91 insertions(+), 2 deletions(-)
diffs (122 lines):
diff -r c6542a8c7bc6 -r d139d9f0a462 net/mDNSResponder/Makefile
--- a/net/mDNSResponder/Makefile Tue Jul 11 14:36:30 2006 +0000
+++ b/net/mDNSResponder/Makefile Tue Jul 11 14:39:29 2006 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.20 2006/03/04 21:30:20 jlam Exp $
+# $NetBSD: Makefile,v 1.21 2006/07/11 14:39:29 drochner Exp $
DISTNAME= mDNSResponder-108
+PKGREVISION= 1
CATEGORIES= net
MASTER_SITES= http://darwinsource.opendarwin.org/tarballs/apsl/
@@ -57,6 +58,11 @@
MAKE_ENV+= EXTRA_LIBS=
.endif
+BUILD_DEFS+= USE_INET6
+.if defined(USE_INET6) && ${USE_INET6} == "YES"
+MAKE_ENV+= HAVE_IPV6=1
+.endif
+
do-install:
for i in ${BINARY}; do \
${INSTALL_PROGRAM} ${BUILDDIR}/$$i ${PREFIX}/bin; \
diff -r c6542a8c7bc6 -r d139d9f0a462 net/mDNSResponder/distinfo
--- a/net/mDNSResponder/distinfo Tue Jul 11 14:36:30 2006 +0000
+++ b/net/mDNSResponder/distinfo Tue Jul 11 14:39:29 2006 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.11 2006/03/03 22:30:56 wiz Exp $
+$NetBSD: distinfo,v 1.12 2006/07/11 14:39:29 drochner Exp $
SHA1 (mDNSResponder-108.tar.gz) = d51509077be75ec8ba49c805fef701c3370428fc
RMD160 (mDNSResponder-108.tar.gz) = 3a1961f3267bcf009b52c8d8ce234ee6045aeed2
Size (mDNSResponder-108.tar.gz) = 1362840 bytes
SHA1 (patch-aa) = 3e8dec4b8d28ed633818edcdea57881dcbb466dc
+SHA1 (patch-ab) = 4903e995df9e895bb1cfc49f7fa0c17c8a5379db
diff -r c6542a8c7bc6 -r d139d9f0a462 net/mDNSResponder/patches/patch-ab
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/mDNSResponder/patches/patch-ab Tue Jul 11 14:39:29 2006 +0000
@@ -0,0 +1,82 @@
+$NetBSD: patch-ab,v 1.5 2006/07/11 14:39:29 drochner Exp $
+
+--- mDNSPosix/mDNSPosix.c.orig 2006-02-20 22:40:36.000000000 +0100
++++ mDNSPosix/mDNSPosix.c
+@@ -852,7 +852,13 @@ mDNSlocal int SetupSocket(struct sockadd
+ {
+ struct ipv6_mreq imr6;
+ struct sockaddr_in6 bindAddr6;
+- #if defined(IPV6_PKTINFO)
++ #if defined(IPV6_RECVPKTINFO)
++ if (err == 0)
++ {
++ err = setsockopt(*sktPtr, IPPROTO_IPV6, IPV6_RECVPKTINFO, &kOn, sizeof(kOn));
++ if (err < 0) { err = errno; perror("setsockopt - IPV6_RECVPKTINFO"); }
++ }
++#elif defined(IPV6_PKTINFO)
+ if (err == 0)
+ {
+ err = setsockopt(*sktPtr, IPPROTO_IPV6, IPV6_PKTINFO, &kOn, sizeof(kOn));
+@@ -861,7 +867,13 @@ mDNSlocal int SetupSocket(struct sockadd
+ #else
+ #warning This platform has no way to get the destination interface information for IPv6 -- will only work for single-homed hosts
+ #endif
+- #if defined(IPV6_HOPLIMIT)
++ #if defined(IPV6_RECVHOPLIMIT)
++ if (err == 0)
++ {
++ err = setsockopt(*sktPtr, IPPROTO_IPV6, IPV6_RECVHOPLIMIT, &kOn, sizeof(kOn));
++ if (err < 0) { err = errno; perror("setsockopt - IPV6_RECVHOPLIMIT"); }
++ }
++ #elif defined(IPV6_HOPLIMIT)
+ if (err == 0)
+ {
+ err = setsockopt(*sktPtr, IPPROTO_IPV6, IPV6_HOPLIMIT, &kOn, sizeof(kOn));
+@@ -1339,6 +1351,36 @@ mDNSlocal mDNSBool mDNSPlatformInit_CanR
+ return(err == 0);
+ }
+
++#ifdef __NetBSD__
++#include <sys/param.h>
++#include <sys/sysctl.h>
++
++void
++initmachinedescr(mDNS *const m)
++{
++ char hwbuf[256], swbuf[256];
++ size_t hwlen, swlen;
++ const int hwmib[] = { CTL_HW, HW_MODEL };
++ const int swmib[] = { CTL_KERN, KERN_OSRELEASE };
++ const char netbsd[] = "NetBSD ";
++
++ hwlen = sizeof(hwbuf);
++ swlen = sizeof(swbuf);
++ if (sysctl(hwmib, 2, hwbuf, &hwlen, 0, 0) ||
++ sysctl(swmib, 2, swbuf, &swlen, 0, 0))
++ return;
++
++ if (hwlen + swlen + sizeof(netbsd) >=254)
++ return;
++
++ m->HIHardware.c[0] = hwlen - 1;
++ m->HISoftware.c[0] = swlen + sizeof(netbsd) - 2;
++ memcpy(&m->HIHardware.c[1], hwbuf, hwlen - 1);
++ memcpy(&m->HISoftware.c[1], netbsd, sizeof(netbsd) - 1);
++ memcpy(&m->HISoftware.c[1 + sizeof(netbsd) - 1], swbuf, swlen - 1);
++}
++#endif
++
+ // mDNS core calls this routine to initialise the platform-specific data.
+ mDNSexport mStatus mDNSPlatformInit(mDNS *const m)
+ {
+@@ -1360,6 +1402,10 @@ mDNSexport mStatus mDNSPlatformInit(mDNS
+ GetUserSpecifiedRFC1034ComputerName(&m->hostlabel);
+ if (m->hostlabel.c[0] == 0) MakeDomainLabelFromLiteralString(&m->hostlabel, "Computer");
+
++#ifdef __NetBSD__
++ initmachinedescr(m);
++#endif
++
+ mDNS_SetFQDN(m);
+
+ sa.sa_family = AF_INET;
Home |
Main Index |
Thread Index |
Old Index