This commit is contained in:
Manfred Touron
2017-05-18 18:54:23 +02:00
parent dc386661ca
commit 5448f25fd6
645 changed files with 55908 additions and 33297 deletions

View File

@@ -67,7 +67,7 @@ func Addrs(af int, name string) ([]Addr, error) {
continue
}
sa := (*sockaddrStorage)(unsafe.Pointer(&lifr.Lifru[0]))
l := int(nativeEndian.Uint32(lifr.Lifru1[:4]))
l := int(littleEndian.Uint32(lifr.Lifru1[:4]))
if l == 0 {
continue
}
@@ -77,7 +77,7 @@ func Addrs(af int, name string) ([]Addr, error) {
copy(a.IP[:], lifr.Lifru[4:8])
as = append(as, a)
case sysAF_INET6:
a := &Inet6Addr{PrefixLen: l, ZoneID: int(nativeEndian.Uint32(lifr.Lifru[24:28]))}
a := &Inet6Addr{PrefixLen: l, ZoneID: int(littleEndian.Uint32(lifr.Lifru[24:28]))}
copy(a.IP[:], lifr.Lifru[8:24])
as = append(as, a)
}