summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorArne Schwabe <arne@openvpn.net>2019-02-22 14:17:27 +0100
committerArne Schwabe <arne@openvpn.net>2019-02-22 14:43:53 +0100
commit4ba24af5fccb9d6401146843de16214610589d21 (patch)
tree36e9ba819c62850d10359affd71092481a61e545 /main
parent7d767337c1614e76dfd6fd460bc087dd4021cb42 (diff)
Log allowed address families in Log
Diffstat (limited to 'main')
-rw-r--r--main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java21
1 files changed, 18 insertions, 3 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java b/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java
index ec29cb3e..064f3828 100644
--- a/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java
+++ b/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java
@@ -725,7 +725,8 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac
VpnStatus.logInfo(R.string.last_openvpn_tun_config);
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && !mProfile.mBlockUnusedAddressFamilies) {
+ boolean allowUnsetAF = Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && !mProfile.mBlockUnusedAddressFamilies;
+ if (allowUnsetAF) {
allowAllAFFamilies(builder);
}
@@ -828,15 +829,29 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac
builder.addSearchDomain(mDomain);
String ipv4info;
+ String ipv6info;
+ if (allowUnsetAF) {
+ ipv4info = "(not set, allowed)";
+ ipv6info = "(not set, allowed)";
+ } else {
+ ipv4info = "(not set)";
+ ipv6info = "(not set)";
+ }
+
int ipv4len;
if (mLocalIP!=null) {
ipv4len=mLocalIP.len;
ipv4info=mLocalIP.mIp;
} else {
ipv4len = -1;
- ipv4info="(not set)";
}
- VpnStatus.logInfo(R.string.local_ip_info, ipv4info, ipv4len, mLocalIPv6, mMtu);
+
+ if (mLocalIPv6!=null)
+ {
+ ipv6info = mLocalIPv6;
+ }
+
+ VpnStatus.logInfo(R.string.local_ip_info, ipv4info, ipv4len, ipv6info, mMtu);
VpnStatus.logInfo(R.string.dns_server_info, TextUtils.join(", ", mDnslist), mDomain);
VpnStatus.logInfo(R.string.routes_info_incl, TextUtils.join(", ", mRoutes.getNetworks(true)), TextUtils.join(", ", mRoutesv6.getNetworks(true)));
VpnStatus.logInfo(R.string.routes_info_excl, TextUtils.join(", ", mRoutes.getNetworks(false)), TextUtils.join(", ", mRoutesv6.getNetworks(false)));