Closed Bug 24906 Opened 20 years ago Closed 20 years ago

PR_IsNetAddrType() cleanups

Categories

(NSPR :: NSPR, enhancement, P3)

x86
Linux
enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jgmyers, Assigned: srinivas)

Details

Attachments

(2 files)

Some protocols, such as FTP, will need to know if an address is v4 or v4mapped.
Proposed patch also fixes PR_IsNetAddrType(PR_IpAddrLoopback) to recognized v4
mapped loopback addresses.
Status: NEW → ASSIGNED
Should PR_IsNetAddrType(::FFFF:0, PR_IpAddrAny) return PR_TRUE ?
I'm working on cleaning up PR_IsNetAddrType(), will submit new patch and 
reassign back when done.
Assignee: srinivas → jgmyers
Status: ASSIGNED → NEW
We should check RFC 2553 to see if it has any
guidance on whether ::FFFF:0 should be considered
a wildcard address, and similarly, whether
::FFFF:127.0.0.1 should be considered a loopback
address for IPv6.
Changing summary, was "Need mechanism for determining if addr is v4 or v4mapped"

RFC 2553 is a bit silent on the issue.  I can't help but to think 
::FFFF:127.0.0.1 must be considered a loopback address, as that is what NSPR 
will generate in some cases.
 
Summary: Need mechanism for determining if addr is v4 or v4mapped → PR_IsNetAddrType() cleanups
Latest proposed fix also extends PR_IpAddrLoopback to match any v4 address in
net 127.
Reassign to Srinivas for review.
Assignee: jgmyers → srinivas
I misspelled IN6_IS_ADDR_UNSPECIFIED in the 1/25/00 patch by leaving out an F.
Checked in the modifications, but for the following:

- recognize Ipv4 addresses as Ipv4-mapped addresses
- PR_IpAddrLoopback to match any v4 address in net 127

These modifications don't seem correct.


/cvsroot/mozilla/nsprpub/pr/src/misc/prnetdb.c, new revision: 3.11.4.6
/cvsroot/mozilla/nsprpub/pr/tests/gethost.c, new revision: 3.1.18.3
Status: NEW → ASSIGNED
Good enough, I think you can resolve this fixed.

You probably should remove the extern declaration of ConvertToIpv4NetAddr() in 
prnetdb.c as it is no longer referenced.
Markingfixed.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.