Re: Removing INET6 does stop the crashes.

2002-07-31 Thread Munechika Sumikawa

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

I've committed the patch. Thanks.

---
Munechika SUMIKAWA @ KAME Project / FreeBSD.org

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Removing INET6 does stop the crashes.

2002-07-30 Thread Hajimu UMEMOTO

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.8content-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/



Re: Removing INET6 does stop the crashes.

2002-07-29 Thread walt

Maxim Konovalov wrote:
 On 18:19-0700, Jul 28, 2002, walt wrote:
 
 
After reading Scott Long's recent post I tried removing INET6
from my kernel config and the crashes due to mozilla are now
definitely gone.
 
 [...]
 
 Please try the next patch.
 
 Index: sys/netinet/tcp_usrreq.c
 ===
 RCS file: /home/ncvs/src/sys/netinet/tcp_usrreq.c,v
 retrieving revision 1.78
 diff -u -r1.78 tcp_usrreq.c
 --- sys/netinet/tcp_usrreq.c  25 Jul 2002 18:10:04 -  1.78
 +++ sys/netinet/tcp_usrreq.c  28 Jul 2002 14:34:09 -
 @@ -407,8 +407,10 @@
   if (IN6_IS_ADDR_V4MAPPED(sin6p-sin6_addr)) {
   struct sockaddr_in sin;
 
 - if ((inp-inp_flags  IN6P_IPV6_V6ONLY) != 0)
 - return(EINVAL);
 + if ((inp-inp_flags  IN6P_IPV6_V6ONLY) != 0) {
 + error = EINVAL;
 + goto out;
 + }
 
   in6_sin6_2_sin(sin, sin6p);
   inp-inp_vflag |= INP_IPV4;
 
 %%%

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




To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Removing INET6 does stop the crashes.

2002-07-29 Thread John Baldwin


On 29-Jul-2002 walt wrote:
 Maxim Konovalov wrote:
 On 18:19-0700, Jul 28, 2002, walt wrote:
 
 
After reading Scott Long's recent post I tried removing INET6
from my kernel config and the crashes due to mozilla are now
definitely gone.
 
 [...]
 
 Please try the next patch.
 
 Index: sys/netinet/tcp_usrreq.c
 ===
 RCS file: /home/ncvs/src/sys/netinet/tcp_usrreq.c,v
 retrieving revision 1.78
 diff -u -r1.78 tcp_usrreq.c
 --- sys/netinet/tcp_usrreq.c 25 Jul 2002 18:10:04 -  1.78
 +++ sys/netinet/tcp_usrreq.c 28 Jul 2002 14:34:09 -
 @@ -407,8 +407,10 @@
  if (IN6_IS_ADDR_V4MAPPED(sin6p-sin6_addr)) {
  struct sockaddr_in sin;
 
 -if ((inp-inp_flags  IN6P_IPV6_V6ONLY) != 0)
 -return(EINVAL);
 +if ((inp-inp_flags  IN6P_IPV6_V6ONLY) != 0) {
 +error = EINVAL;
 +goto out;
 +}
 
  in6_sin6_2_sin(sin, sin6p);
  inp-inp_vflag |= INP_IPV4;
 
 %%%
 
 Yes, it stops the crashes.  If I set v6only = 0 then the machine
 works normally; if set to 1 then I get connection refused from
 any server I try to connect to.  Is that normal v6only behavior?

Let's get this patch committed then. :)

-- 

John Baldwin [EMAIL PROTECTED]http://www.FreeBSD.org/~jhb/
Power Users Use the Power to Serve!  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Removing INET6 does stop the crashes.

2002-07-29 Thread Maxim Konovalov


[...]

 Let's get this patch committed then. :)

Already done, sys/netinet/tcp_usrreq.c rev. 1.79

-- 
Maxim Konovalov, [EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Removing INET6 does stop the crashes.

2002-07-29 Thread Hajimu UMEMOTO

Hi,

 On Mon, 29 Jul 2002 08:11:50 -0700
 walt [EMAIL PROTECTED] said:

After reading Scott Long's recent post I tried removing INET6
from my kernel config and the crashes due to mozilla are now
definitely gone.

Thank you for fixing it.  I tried to fix as the same way as you did,
then during committing my fix, I found that it was already fixed by
you. :-)

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?

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

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

Our port should have it, too.

Sincerely,

--
Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
[EMAIL PROTECTED]  [EMAIL PROTECTED]  ume@{,jp.}FreeBSD.org
http://www.imasy.org/~ume/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Removing INET6 does stop the crashes.

2002-07-28 Thread walt

After reading Scott Long's recent post I tried removing INET6
from my kernel config and the crashes due to mozilla are now
definitely gone.

The question remains, I suppose, whether there are other programs
that will still trigger the same kernel bug in a different way,
or whether the bug truly is in the INET6 code.  I do know I was
never trying to connect to any ipv6 site during the crashes,
which seems a bit suspicious.

If Seigo Tanimura's recent swapping patch also fixes the crashing
(I haven't yet tried it) then perhaps the INET6 thing is just a
red herring--but for now it seems okay to me.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: Removing INET6 does stop the crashes.

2002-07-28 Thread Lamont Granquist


Yeah, removing INET6 seems to make it much more stable for me as well.

On Sun, 28 Jul 2002, walt wrote:
 After reading Scott Long's recent post I tried removing INET6
 from my kernel config and the crashes due to mozilla are now
 definitely gone.

 The question remains, I suppose, whether there are other programs
 that will still trigger the same kernel bug in a different way,
 or whether the bug truly is in the INET6 code.  I do know I was
 never trying to connect to any ipv6 site during the crashes,
 which seems a bit suspicious.

 If Seigo Tanimura's recent swapping patch also fixes the crashing
 (I haven't yet tried it) then perhaps the INET6 thing is just a
 red herring--but for now it seems okay to me.


 To Unsubscribe: send mail to [EMAIL PROTECTED]
 with unsubscribe freebsd-current in the body of the message




To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message