summaryrefslogtreecommitdiff
path: root/src/se/leap
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2013-11-09 01:36:35 +0100
committerParménides GV <parmegv@sdf.org>2013-11-09 01:36:35 +0100
commit5b772c23c3f45405f30de4a180fe47dbcb2fdfc4 (patch)
treea96f455e1f44fe4467a0d6f17b6c5c90d3d6289d /src/se/leap
parentd6286fe0cefc46fc5cd197946311ddf494393ae1 (diff)
No new routes if openvpn is already running.
We cannot add routes to an existing openvpn session because it makes openvpn reconnect.
Diffstat (limited to 'src/se/leap')
-rw-r--r--src/se/leap/openvpn/OpenVpnManagementThread.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/se/leap/openvpn/OpenVpnManagementThread.java b/src/se/leap/openvpn/OpenVpnManagementThread.java
index 2445c38e..78ce5a2b 100644
--- a/src/se/leap/openvpn/OpenVpnManagementThread.java
+++ b/src/se/leap/openvpn/OpenVpnManagementThread.java
@@ -333,7 +333,8 @@ public class OpenVpnManagementThread implements Runnable {
mOpenVPNService.setDomain(extra);
} else if (needed.equals("ROUTE")) {
String[] routeparts = extra.split(" ");
- mOpenVPNService.addRoute(routeparts[0], routeparts[1]);
+ if(!mOpenVPNService.isRunning()) // We cannot add routes to an existing openvpn session
+ mOpenVPNService.addRoute(routeparts[0], routeparts[1]);
} else if (needed.equals("ROUTE6")) {
mOpenVPNService.addRoutev6(extra);
} else if (needed.equals("IFCONFIG")) {