1
0
Fork 0
mirror of https://github.com/M66B/NetGuard.git synced 2025-01-01 21:04:08 +00:00

Find uid by source port and source address

This commit is contained in:
M66B 2017-03-11 07:24:49 +01:00
parent 57cafd6fe8
commit 6809f5d0dc

View file

@ -450,10 +450,10 @@ jint get_uid(const int version, const int protocol,
log_android(ANDROID_LOG_INFO, "%s/%u %d %s", source, port, u, line);
}
if (port == sport) {
if (port == sport &&
memcmp(version == 4 ? addr4 : addr6, saddr, version == 4 ? 4 : 16) == 0) {
uid = u;
if (memcmp(version == 4 ? addr4 : addr6, saddr, version == 4 ? 4 : 16) == 0)
break;
break;
}
}
else