|
|
@ -721,9 +721,13 @@ func decodeAddressWithContext(ctx context.Context, family uint32, src string) (A
|
|
|
|
return Addr{}, fmt.Errorf("decode error, %w", err)
|
|
|
|
return Addr{}, fmt.Errorf("decode error, %w", err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
var ip net.IP
|
|
|
|
var ip net.IP
|
|
|
|
// Assumes this is little_endian
|
|
|
|
|
|
|
|
if family == syscall.AF_INET {
|
|
|
|
if family == syscall.AF_INET {
|
|
|
|
ip = net.IP(ReverseWithContext(ctx, decoded))
|
|
|
|
if IsLittleEndian() {
|
|
|
|
|
|
|
|
ip = net.IP(ReverseWithContext(ctx, decoded))
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
ip = net.IP(decoded)
|
|
|
|
|
|
|
|
}
|
|
|
|
} else { // IPv6
|
|
|
|
} else { // IPv6
|
|
|
|
ip, err = parseIPv6HexStringWithContext(ctx, decoded)
|
|
|
|
ip, err = parseIPv6HexStringWithContext(ctx, decoded)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|