Hi,

>>> Tue, 30 Jul 2002 02:12:41 +0900,
>>> Hajimu UMEMOTO <[EMAIL PROTECTED]> said:

wa1ter> Yes, it stops the crashes.  If I set v6only = 0 then the machine
wa1ter> works normally; if set to 1 then I get "connection refused" from
wa1ter> any server I try to connect to.  Is that normal v6only behavior?

ume> It is expected behaivior.  However, I realized that Mozilla still has
ume> the problem that IPv4-mapped IPv6 address is used to connect to IPv4
ume> site.  It should be fixed by Mozilla side.  I heared that NetBSD
ume> pkgsrc has a workaround to this problem:

ume> 
http://cvsweb.no.netbsd.org/bsdweb.cgi/pkgsrc/www/mozilla/patches/patch-be?rev=1.8&content-type=text/x-cvsweb-markup

ume> Our port should have it, too.

This patch is for ports/www/mozilla, and enables IPv4-mapped IPv6
address per socket basis.  Please try it.

Sincerely,

Index: nsprpub/pr/src/pthreads/ptio.c
diff -u nsprpub/pr/src/pthreads/ptio.c.orig nsprpub/pr/src/pthreads/ptio.c
--- nsprpub/pr/src/pthreads/ptio.c.orig	Fri Apr 12 03:14:39 2002
+++ nsprpub/pr/src/pthreads/ptio.c	Tue Jul 30 18:52:11 2002
@@ -3414,6 +3414,17 @@
     if (osfd == -1) pt_MapError(_PR_MD_MAP_SOCKET_ERROR, errno);
     else
     {
+#if (defined(_PR_INET6_PROBE) || defined(_PR_INET6)) && \
+	defined(__FreeBSD__) && defined(IPV6_V6ONLY)
+		if (domain == PR_AF_INET6) {
+			int opt = 0;
+			if (setsockopt(osfd, IPPROTO_IPV6, IPV6_V6ONLY,
+                           &opt, sizeof(opt))) {
+				close(osfd);
+				return NULL;
+			}
+		}
+#endif
         fd = pt_SetMethods(osfd, ftype, PR_FALSE, PR_FALSE);
         if (fd == NULL) close(osfd);
     }
--
Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
[EMAIL PROTECTED]  [EMAIL PROTECTED]  ume@{,jp.}FreeBSD.org
http://www.imasy.org/~ume/

Reply via email to