Open Bug 388519 Opened 18 years ago Updated 3 years ago

Need portable method to ask if local system supports IPv6

Categories

(NSPR :: NSPR, enhancement, P5)

4.6.6
x86
Windows XP
enhancement

Tracking

(Not tracked)

People

(Reporter: nelson, Unassigned)

References

(Depends on 1 open bug)

Details

NSPR needs to offer a portable way for the application to probe the local system's IPv6 capabilities. In bug 388117 comment 5, Wan-Teh wrote: > NSPR detects the presence of IPv6 by trying to open an > AF_INET6 socket. You'll need to implement this test by > calling the socket() function directly, because > PR_OpenTCPSocket(PR_AF_INET6) may return a fake IPv6 > socket that only works with IPv4-mapped IPv6 addresses. If the application must use the OS'es underlying socket system calls directly, that defeats the major purpose of using NSPR, and gives NSPR's critics yet another reason to propose that companies abandon NSPR. So, NSPR must provide the necessary means to implement portable code for servers that wish to support IPv6 on platforms that actually support it. I can think of a few different ways to try to do this. Some of them, off the top of my head, are: a) look through the set of local system interfaces, looking at their interface addresses, to see if any of them have IPv6 addresses. This is likely to be VERY platform dependent. b) Open a PR_AF_INET6 socket, set the IPV6_V6ONLY socket option, and then bind to some IPv6 address. I am not sure this would work. Perhaps a bind to address [::] or [::1] would succeed anyway? Julien observes that a system might not have a loopback interface configured, but still might support IPv6. It would be nice if this method would work, because that would mean that the fix for bug 190467 would also resolve this bug. Other ideas?
Priority: -- → P2
Target Milestone: --- → 4.6.8
Version: 4.6.8 → 4.6.6
Target Milestone: 4.6.8 → 4.7.1

The bug assignee didn't login in Bugzilla in the last 7 months and this bug has priority 'P2'.
:KaiE, could you have a look please?
For more information, please visit auto_nag documentation.

Assignee: wtc → nobody
Flags: needinfo?(kaie)
Flags: needinfo?(kaie)
Priority: P2 → P5
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.