Bugzilla bug #83845: the IPv6-to-IPv4 getpeername method was invoking MOZILLA_0_9_1_BRANCH MOZILLA_0_9_1_2001060715 MOZILLA_0_9_1_RELEASE Netscape61_PR1_RELEASE
authorwtc%netscape.com
Mon, 04 Jun 2001 17:18:06 +0000
branchMOZILLA_0_9_1_BRANCH
changeset 1913 250d54bb5e69
parent 1908 dbdc9b23327f
push idunknown
push userunknown
push dateunknown
bugs83845
Bugzilla bug #83845: the IPv6-to-IPv4 getpeername method was invoking the getsockname method of the IPv4 socket layer. Thanks to Terry Hayes <thayes@netscape.com> for the bug fix. Tag: MOZILLA_0_9_1_BRANCH. a=blizzard@mozilla.org.
pr/src/io/pripv6.c
--- a/pr/src/io/pripv6.c
+++ b/pr/src/io/pripv6.c
@@ -229,17 +229,17 @@ static PRStatus PR_CALLBACK Ipv6ToIpv4So
 }
 
 static PRStatus PR_CALLBACK Ipv6ToIpv4SocketGetPeerName(PRFileDesc *fd,
 										PRNetAddr *ipv6addr)
 {
 	PRStatus result;
 	PRNetAddr tmp_ipv4addr;
 
-	result = (fd->lower->methods->getsockname)(fd->lower, &tmp_ipv4addr);
+	result = (fd->lower->methods->getpeername)(fd->lower, &tmp_ipv4addr);
 	if (PR_SUCCESS == result) {
 		_PR_ConvertToIpv6NetAddr(&tmp_ipv4addr, ipv6addr);
 		PR_ASSERT(IsValidNetAddr(ipv6addr) == PR_TRUE);
 	}
 	return result;
 }
 
 static PRInt32 PR_CALLBACK Ipv6ToIpv4SocketRecvFrom(PRFileDesc *fd, void *buf,