Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Jul 2002 19:07:12 +0900
From:      Hajimu UMEMOTO <ume@mahoroba.org>
To:        walt <wa1ter@hotmail.com>, sumikawa@FreeBSD.org
Cc:        freebsd-current@freebsd.org
Subject:   Re: Removing INET6 does stop the crashes.
Message-ID:  <ygek7nda5rj.wl@lyrics.mahoroba.org>
In-Reply-To: <ygebs8qcvau.wl@mille.mahoroba.org>
References:  <ai2h6k$321$1@FreeBSD.csie.NCTU.edu.tw> <3D455B36.10500@hotmail.com> <ygebs8qcvau.wl@mille.mahoroba.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--Multipart_Tue_Jul_30_19:07:12_2002-1
Content-Type: text/plain; charset=US-ASCII

Hi,

>>> Tue, 30 Jul 2002 02:12:41 +0900,
>>> Hajimu UMEMOTO <ume@mahoroba.org> 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,


--Multipart_Tue_Jul_30_19:07:12_2002-1
Content-Type: text/x-patch; charset=US-ASCII
Content-Disposition: attachment; filename="patch-nsprpub::pr::src::pthreads::ptio.c"
Content-Transfer-Encoding: 7bit

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);
     }

--Multipart_Tue_Jul_30_19:07:12_2002-1
Content-Type: text/plain; charset=US-ASCII

--
Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
ume@mahoroba.org  ume@bisd.hitachi.co.jp  ume@{,jp.}FreeBSD.org
http://www.imasy.org/~ume/

--Multipart_Tue_Jul_30_19:07:12_2002-1--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ygek7nda5rj.wl>