IPv6 Resolver (or: Slow rendering of Webpages using Konqueror)

Don Lewis truckman at FreeBSD.org
Sat May 3 12:48:07 PDT 2003


On  3 May, Chris BeHanna wrote:
> On Wed, 30 Apr 2003, Don Lewis wrote:
> 
>> On 30 Apr, Andrew P. Lentvorski, Jr. wrote:
>>
>> > I have issues which somewhat match those symptoms.  On FreeBSD 4.8,
>> > Mozilla will occasionally get "stuck" for a couple minutes (the first time
>> > I hit dilbert.com in a day seems to be a fairly reliable culprit).  After
>> > that, it seems to run fine for an hour or so, at which point it will get
>> > stuck on some random site again.  Wait a couple minutes, then it will be
>> > fine again.  Lather, rinse, repeat.
>>
>> I had this problem as well a while back until I neutered Mozilla so that
>> it wouldn't do the IPv6 address lookups anymore.
> 
>     It'd be great if you could produce patches so that Mozilla could
> be built with a "WITHOUT_IPV6" knob.
>
>     That's a band-aid on the problem of broken nameservers, yes, but
> it'll help novices get over the hump.

It doesn't help users who install a precompiled package.  It might be
easier for them to build and install a kernel without INET6.

Anyway, here's the patch file that I used, but it doesn't have a handy
knob for turning IPv6 on and off.  I think only one part of the patch is
necessary, but the source code is complex enough that it took me several
attempts to disable the unwanted behaviour.

--- nsprpub/pr/src/io/pripv6.c.orig	Tue Apr  9 20:17:02 2002
+++ nsprpub/pr/src/io/pripv6.c	Sun Jul 21 04:00:06 2002
@@ -307,7 +307,7 @@
 		if (NULL != _pr_freehostent_fp) {
 			_pr_getipnodebyaddr_fp = PR_FindSymbol(lib, GETIPNODEBYADDR);
 			if (NULL != _pr_getipnodebyaddr_fp)
-				_pr_ipv6_is_present = PR_TRUE;
+				_pr_ipv6_is_present = PR_FALSE;
 			else
 				_pr_ipv6_is_present = PR_FALSE;
 		} else
--- nsprpub/pr/src/io/prsocket.c.orig	Tue Apr  9 20:17:03 2002
+++ nsprpub/pr/src/io/prsocket.c	Sun Jul 21 14:36:15 2002
@@ -1256,7 +1256,7 @@
 	osfd = _PR_MD_SOCKET(AF_INET6, SOCK_STREAM, 0);
 	if (osfd != -1) {
 		_PR_MD_CLOSE_SOCKET(osfd);
-		return PR_TRUE;
+		return PR_FALSE;
 	}
 	return PR_FALSE;
 }
--- nsprpub/pr/src/pthreads/ptio.c.orig	Thu Apr 11 11:14:39 2002
+++ nsprpub/pr/src/pthreads/ptio.c	Sun Jul 21 14:48:47 2002
@@ -3363,7 +3363,7 @@
 	osfd = socket(AF_INET6, SOCK_STREAM, 0);
 	if (osfd != -1) {
 		close(osfd);
-		return PR_TRUE;
+		return PR_FALSE;
 	}
 	return PR_FALSE;
 }





More information about the freebsd-stable mailing list