From 9b224314eb90b4219c2dcd898f675c194b81be44 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 12 Feb 2016 21:01:27 +0100 Subject: [PATCH] Revert "Allow unknown addresses" This reverts commit c4cf6bf7b2383fd7e60a30929a425e66b1aaae1d. --- .../java/eu/faircode/netguard/SinkholeService.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/eu/faircode/netguard/SinkholeService.java b/app/src/main/java/eu/faircode/netguard/SinkholeService.java index 0dca5725..5e0c94bd 100644 --- a/app/src/main/java/eu/faircode/netguard/SinkholeService.java +++ b/app/src/main/java/eu/faircode/netguard/SinkholeService.java @@ -513,7 +513,7 @@ public class SinkholeService extends VpnService implements SharedPreferences.OnS showAccessNotification(packet.uid); } - if (packet.uid < 0) + if (packet.uid < 0 && packet.dport != 53) Log.w(TAG, "Unknown application packet " + packet); } @@ -1191,13 +1191,8 @@ public class SinkholeService extends VpnService implements SharedPreferences.OnS packet.allowed = false; if (prefs.getBoolean("filter", false)) { - // https://android.googlesource.com/platform/system/core/+/master/include/private/android_filesystem_config.h - if (packet.uid < 2000 && - !(packet.uid == 0 || // root - packet.uid == 1000 || // system server - packet.uid == 1001 || // telephony subsystem - packet.uid == 1013)) // mediaserver - packet.allowed = true; // allow unknown traffic + if (packet.uid < 0) // unknown + packet.allowed = true; else { boolean filtered = false; // Only TCP (6) and UDP (17) have port numbers