Skip to content

Commit a64399c

Browse files
committed
x/mobile: fix net.Interface() and net.InterfaceAddrs() in Android11 version
1 parent 1012c07 commit a64399c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/net/interface_android.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ loop:
4141
ifam := (*syscall.IfAddrmsg)(unsafe.Pointer(&m.Data[0]))
4242
if _, ok := im[ifam.Index]; ok {
4343
continue
44+
} else {
45+
im[ifam.Index] = struct{}{}
4446
}
4547

4648
if ifindex == 0 || ifindex == int(ifam.Index) {

0 commit comments

Comments
 (0)