Skip to content

Commit 9d991b4

Browse files
committed
tcp,udp: m code comment
1 parent 9b5bf7c commit 9d991b4

2 files changed

Lines changed: 14 additions & 5 deletions

File tree

intra/common.go

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@ import (
3232
)
3333

3434
const (
35-
smmchSize = 256 // some comfortably high number
36-
UNKNOWN_UID = core.UNKNOWN_UID
37-
UNKNOWN_UID_STR = core.UNKNOWN_UID_STR
35+
smmchSize = 256 // some comfortably high number
36+
UNKNOWN_UID = core.UNKNOWN_UID
37+
UNKNOWN_UID_STR = core.UNKNOWN_UID_STR
38+
// ANDROID_UID = core.ANDROID_UID
3839
ANDROID_UID_STR = core.ANDROID_UID_STR
3940
SELF_UID = protect.UidSelf
4041
UNSUPPORTED_NETWORK = core.UNSUPPORTED_NETWORK
@@ -148,6 +149,13 @@ func (h *baseHandler) onFlow(localaddr, target netip.AddrPort) (fm *Mark, undidA
148149
if procEntry != nil {
149150
uid = procEntry.UserID
150151
preuid = strconv.Itoa(uid)
152+
} else {
153+
// TODO: ipmapper wouldn't call into LookupFor (instead call into LocalLookup)
154+
// when preuid (uid) is UNKNOWN_UID which is not what we want with ResolveFor
155+
// call made below; that is, we want ResolveFor to call into ipmapper to then
156+
// in to LookupFor so dnsx.Fixed would be the chosen transport?
157+
// uid = ANDROID_UID
158+
// preuid = ANDROID_UID_STR
151159
}
152160
}
153161

intra/core/proto.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ import (
1717

1818
// ref: cs.android.com/android/platform/superproject/+/android-latest-release:system/core/libcutils/include/private/android_filesystem_config.h;drc=e999f05f34e91a3a313ba7dd77bcf52b58a0841e
1919
const (
20-
UNKNOWN_UID = -1
21-
UNKNOWN_UID_STR = "-1"
20+
UNKNOWN_UID = -1
21+
UNKNOWN_UID_STR = "-1"
22+
// ANDROID_UID = 0
2223
ANDROID_UID_STR = "0"
2324
DNS_UID_STR = "1051"
2425
UNSUPPORTED_NETWORK = -1

0 commit comments

Comments
 (0)