Unverified Commit 2897ca4f authored by Steven Allen's avatar Steven Allen Committed by GitHub

Merge pull request #7 from libp2p/fix/v4inv6

set the V4InV6Prefix correctly (like go does)
parents 5343121a 77df618d
......@@ -195,6 +195,9 @@ func SockaddrToIPAndZone(sa Sockaddr) (net.IP, string) {
switch sa := sa.(type) {
case *SockaddrInet4:
ip := make([]byte, 16)
// V4InV6Prefix
ip[10] = 0xff
ip[11] = 0xff
copy(ip[12:16], sa.Addr[:])
return ip, ""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment