ICMP has no real port numbers

This commit is contained in:
M66B 2016-02-05 22:10:12 +01:00
parent dc93dc4ad2
commit fd022f4065
1 changed files with 3 additions and 0 deletions

View File

@ -1102,6 +1102,9 @@ public class SinkholeService extends VpnService implements SharedPreferences.OnS
if (packet.uid == Process.myUid())
return true;
if (packet.protocol == 1 || packet.protocol == 58) // ICMP
packet.dport = 0;
packet.allowed = false;
if (prefs.getBoolean("filter", false)) {
if (packet.uid < 0) // unknown