The getnameinfo()-backed PR_NetAddrToString() implementation renders IPv4-mapped IPv6 addresses and IPv4-compatible addresses incorrectly as IPv4 addresses. E.g. "::ffff:192.168.1.1" or "::192.168.1.1" are both rendered as "192.168.1.1". The V6AddrToString()-backed version of PR_NetAddrToString(), on the other hand, renders the addresses as expected in IPv6 presentation format. The problem here seems to be the behavior of getnameinfo: "If the socket address structure contains an IPv4-mapped IPv6 address or an IPv4-compatible IPv6 address, the implementation shall extract the embedded IPv4 address and lookup the node name for that IPv4 address."