summaryrefslogtreecommitdiff
path: root/main/src
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2014-02-17 19:50:14 +0100
committerArne Schwabe <arne@rfc2549.org>2014-02-17 19:50:14 +0100
commit0c3f0cae9bcfc862052e9ccc137a63f9587002a2 (patch)
tree30596887e4d02c6a09eb346e64273ab705fdcc62 /main/src
parentff272c7a48e8a9660803b940d8944596d1984d92 (diff)
Add the dynamic max routes patch
Diffstat (limited to 'main/src')
-rw-r--r--main/src/main/java/de/blinkt/openvpn/VpnProfile.java10
1 files changed, 1 insertions, 9 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/VpnProfile.java b/main/src/main/java/de/blinkt/openvpn/VpnProfile.java
index 1ec34b51..d7a0703b 100644
--- a/main/src/main/java/de/blinkt/openvpn/VpnProfile.java
+++ b/main/src/main/java/de/blinkt/openvpn/VpnProfile.java
@@ -322,14 +322,13 @@ public class VpnProfile implements Serializable {
cfg += "route-nopull\n";
String routes = "";
- int numroutes = 0;
+
if (mUseDefaultRoute)
routes += "route 0.0.0.0 0.0.0.0 vpn_gateway\n";
else
{
for (String route : getCustomRoutes(mCustomRoutes)) {
routes += "route " + route + " vpn_gateway\n";
- numroutes++;
}
for (String route: getCustomRoutes(mExcludedRoutes)) {
@@ -348,15 +347,8 @@ public class VpnProfile implements Serializable {
else
for (String route : getCustomRoutesv6(mCustomRoutesv6)) {
routes += "route-ipv6 " + route + "\n";
- numroutes++;
}
- // Round number to next 100
- if (numroutes > 90) {
- numroutes = ((numroutes / 100) + 1) * 100;
- cfg += "# A lot of routes are set, increase max-routes\n";
- cfg += "max-routes " + numroutes + "\n";
- }
cfg += routes;
if (mOverrideDNS || !mUsePull) {