Fixed crash on devices using Android 4.x

This commit is contained in:
PeratX 2017-09-03 10:59:41 +08:00
parent 56c1b4efbf
commit 3e736e1648

View File

@ -229,7 +229,7 @@ public class DaedalusVpnService extends VpnService implements Runnable {
Log.d(TAG, "configure: Adding IPv6 address" + addr);
builder.addAddress(addr, 120);
} catch (Exception e) {
e.printStackTrace();
Logger.logException(e);
ipv6Template = null;
}
@ -256,11 +256,10 @@ public class DaedalusVpnService extends VpnService implements Runnable {
if (advanced) {
builder.setBlocking(true);
builder.allowFamily(OsConstants.AF_INET);
builder.allowFamily(OsConstants.AF_INET6);
}
builder.allowFamily(OsConstants.AF_INET);
builder.allowFamily(OsConstants.AF_INET6);
descriptor = builder.establish();
Logger.info("Daedalus VPN service is started");