Commit 77df618d authored by Steven Allen's avatar Steven Allen

set the V4InV6Prefix correctly (like go does)

This is why go uses 16 byte arrays for all addresses by default.
parent 5343121a
...@@ -195,6 +195,9 @@ func SockaddrToIPAndZone(sa Sockaddr) (net.IP, string) { ...@@ -195,6 +195,9 @@ func SockaddrToIPAndZone(sa Sockaddr) (net.IP, string) {
switch sa := sa.(type) { switch sa := sa.(type) {
case *SockaddrInet4: case *SockaddrInet4:
ip := make([]byte, 16) ip := make([]byte, 16)
// V4InV6Prefix
ip[10] = 0xff
ip[11] = 0xff
copy(ip[12:16], sa.Addr[:]) copy(ip[12:16], sa.Addr[:])
return ip, "" 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