Closed Bug 186745 Opened 22 years ago Closed 22 years ago

Don't use mapped IPv6 address when connecting IPv4 node.

Categories

(NSPR :: NSPR, defect, P2)

x86
FreeBSD
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: kazuhiro, Assigned: wtc)

References

Details

Attachments

(1 file)

User-Agent:       w3m/0.3.2.2+cvs-1.645-m17n-20021222 (FreeBSD 5.0-CURRENT i386)
Build Identifier: 

Don't use mapped IPv6 address when connecting IPv4 node.

see http://www.freebsd.org/cgi/cvsweb.cgi/ports/www/mozilla/files/patch-nsprpub%3a%3apr%3a%3asrc%3a%3apthreads%3a%3aptio.c

If users has no IPv4 connection, they cannot access IPv4 node.


Reproducible: Always

Steps to Reproduce:
1. access from IPv6 only network to IPv4 node.

Actual Results:  
cannot access to IPv4 node.
Mozilla returns 'timeout' message.



FreeBSD ports already fixed this problem locally.
But, this is not a fundamental solution.
We want to fix original 'Mozilla'.
IS this a FreeBSD problem only, or also affecting other OSes?
Status: UNCONFIRMED → NEW
Ever confirmed: true
affect to other OSes using IPv6 only.
If user don't have IPv4 connectivity, that user cannot connect IPv4 node.
-> nspr
Component: Networking → NSPR
Product: Browser → NSPR
Version: Trunk → 3.0
to default.
Assignee: dougt → wtc
QA Contact: benc → wtc
The fix in the FreeBSD ports is incorrect
although it does achieve the desired effect.
The correct fix is to define the _pr_QueryNetIfs
function for FreeBSD in mozilla/nsprpub/pr/src/misc/prnetdb.c.
You can use FreeBSD's getifaddrs function to
implement _pr_QueryNetIfs.
Status: NEW → ASSIGNED
This is the fix I described in comment 5.  To test
this fix you need to remove the patch for
nsprpub/pr/src/pthreads/ptio.c that sets the
IPV6_V6ONLY socket option.

This patch only applies to the current Mozilla
trunk (Mozilla 1.3 Beta).
*** Bug 192696 has been marked as a duplicate of this bug. ***
Patch checked into NSPR TIP (NSPR 4.3) and the
NSPRPUB_PRE_4_2_CLIENT_BRANCH (mozilla 1.4alpha).
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Priority: -- → P2
Resolution: --- → FIXED
Target Milestone: --- → 4.3
|| defined(LINUX)
should be added the patch.

I use RedHat Linux 8.0 with the following settings
( is http://www.6to4.jp/settings/redhat.html )
  1. add "NETWORKING_IPV6" to /etc/sysconfig/network
  2. add the following lines to /etc/sysconfig/network-scripts/ifcfg-eth0
       IPV6INIT=yes
       IPV6TO4INIT=yes
       IPV6TO4_RELAY=202.255.45.5
  3. add the following lines to /etc/sysconfig/static-routes-ipv6
       # IPv6 Testing Address Allocation (6bone testbed)
       sit0                            3ffe::/16
       # IPv6 official addresses
       sit0                            2000::/3

When I start Mozilla on my machine, this bug occures and fixes by adding "||
defined(LINUX)" to the patch.
Sorry. I have a mistake.

|| (defined(LINUX) && defined(HAVE_GETIFADDRS))
should be added.
Mr. Matsuura:

Does this patch work for you on Linux?  Using the SIOCGIFCONF
ioctl may be more portable than using the BSD getifaddrs function
on Linux.

Index: prnetdb.c
===================================================================
RCS file: /cvsroot/mozilla/nsprpub/pr/src/misc/prnetdb.c,v
retrieving revision 3.21.2.11
diff -u -r3.21.2.11 prnetdb.c
--- prnetdb.c   22 Feb 2003 22:50:13 -0000      3.21.2.11
+++ prnetdb.c   24 Feb 2003 19:55:44 -0000
@@ -186,7 +186,8 @@
 #if defined(AIX) \
     || (defined(DARWIN) && (!defined(HAVE_GETIFADDRS) \
         || (defined(MACOS_DEPLOYMENT_TARGET) \
-        && MACOS_DEPLOYMENT_TARGET < 100200)))
+        && MACOS_DEPLOYMENT_TARGET < 100200))) \
+    || defined(LINUX)

 /*
  * Use SIOCGIFCONF ioctl on platforms that don't have routing
A patch in comment 11 works fine on RedHat Linux 8.0.
New Bug 195024 is open for this bug on Linux.
Could someone please verify that the current mozilla trunk
build can do IPv6 on FreeBSD and NetBSD?  Thanks.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: