Skip to content

Commit b628036

Browse files
committed
nilaway: intra/common.go
1 parent 4bc6af3 commit b628036

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

intra/common.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -225,23 +225,23 @@ func (h *baseHandler) onFlow(localaddr, target netip.AddrPort) (fm *Mark, undidA
225225
log.W("com: %s: onFlow: empty res or on flow timeout %t; block!", h.proto, ok)
226226
fm = optionsBlock
227227
} else if len(fm.PIDCSV) <= 0 {
228-
if pre.IsUidSelf {
228+
if preuid == SELF_UID {
229229
fm.PIDCSV = ipn.Exit
230230
} else if h.prox.AutoActive() {
231231
fm.PIDCSV = ipn.Auto
232232
} else {
233233
fm.PIDCSV = ipn.Exit
234234
}
235-
log.E("com: %s: onFlow: no pid for (%s => %s) from kt (alg: %v + %v); %s!",
236-
h.proto, src, dst, ips, doms, fm.PIDCSV)
235+
log.E("com: %s: onFlow: missing proxyid for preuid %s (%s => %s) from kt (alg: %v + %v); %s!",
236+
h.proto, preuid, src, dst, ips, doms, fm.PIDCSV)
237237
}
238-
if pre.IsUidSelf && !ipn.IsAnyLocalProxy(strings.Split(fm.PIDCSV, ",")...) {
238+
if preuid == SELF_UID && !ipn.IsAnyLocalProxy(strings.Split(fm.PIDCSV, ",")...) {
239239
egress := ipn.Exit
240240
if h.resolver.IsDnsAddr(target) {
241241
egress = ipn.Base // see: udp.go:dnsOverride
242242
}
243-
log.W("com: %s: onFlow: preflow: pid (%s => %s) is rethink! override %s to %s!",
244-
h.proto, src, dst, fm.PIDCSV, egress)
243+
log.W("com: %s: onFlow: preflow: preuid %s (%s => %s) is rethink! override %s to %s!",
244+
h.proto, preuid, src, dst, fm.PIDCSV, egress)
245245
fm.PIDCSV = egress
246246
}
247247

0 commit comments

Comments
 (0)