1
0
Fork 0
mirror of https://github.com/M66B/NetGuard.git synced 2024-12-22 07:43:15 +00:00

Workaround Android bug

This commit is contained in:
M66B 2021-02-21 15:47:37 +01:00
parent dd7b99807d
commit 93cd2008d2

View file

@ -1379,7 +1379,8 @@ public class ServiceSinkhole extends VpnService implements SharedPreferences.OnS
Log.i(TAG, "Exclude " + exclude.getStart().getHostAddress() + "..." + exclude.getEnd().getHostAddress());
for (IPUtil.CIDR include : IPUtil.toCIDR(start, IPUtil.minus1(exclude.getStart())))
try {
builder.addRoute(include.address, include.prefix);
if (!"0.0.0.0".equals(include.address.getHostAddress()))
builder.addRoute(include.address, include.prefix);
} catch (Throwable ex) {
Log.e(TAG, ex.toString() + "\n" + Log.getStackTraceString(ex));
}