Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1412712650-5173-1-git-send-email-arne@rfc2549.org>
URL: http://article.gmane.org/gmane.network.openvpn.devel/9090
Signed-off-by: Gert Doering <gert@greenie.muc.de>
| ... | ... |
@@ -2,7 +2,7 @@ This file documents the support in OpenVPN for Android 4.0 and up. |
| 2 | 2 |
|
| 3 | 3 |
This support is primarily used in the "OpenVPN for Android" app |
| 4 | 4 |
(http://code.google.com/p/ics-openvpn/). For building see the developer |
| 5 |
-README: http://code.google.com/p/ics-openvpn/source/browse/README.txt. |
|
| 5 |
+README: http://code.google.com/p/ics-openvpn/source/browse/doc/README.txt. |
|
| 6 | 6 |
|
| 7 | 7 |
Android provides the VPNService API |
| 8 | 8 |
(http://developer.android.com/reference/android/net/VpnService.html) |
| ... | ... |
@@ -55,6 +55,21 @@ To set the DNS server and search domain. |
| 55 | 55 |
The GUI will then respond with a "needok 'command' ok' or "needok |
| 56 | 56 |
'command' cancel', e.g. "needok 'IFCONFIG' ok". |
| 57 | 57 |
|
| 58 |
+PERSIST_TUN_ACTION |
|
| 59 |
+ |
|
| 60 |
+In Android 4.4-4.4.2 a bug exists that does not allow to open a new tun fd |
|
| 61 |
+while a tun fd is still open. When OpenVPN wants to open an fd it will do |
|
| 62 |
+this query. The UI should compare the last configuration of |
|
| 63 |
+the tun device with the current tun configuration and reply with either (or |
|
| 64 |
+always respond with OPEN_AFTER_BEFORE/OPEN_BEFORE_CLOSE) |
|
| 65 |
+ |
|
| 66 |
+- NOACTION: Keep using the old fd |
|
| 67 |
+- OPEN_AFTER_CLOSE: First close the old fd and then open a new to workaround the bug |
|
| 68 |
+- OPEN_BEFORE_CLOSE: the normal behaviour when the VPN configuration changed |
|
| 69 |
+ |
|
| 70 |
+For example the UI could respond with |
|
| 71 |
+needok 'PERSIST_TUN_ACTION' OPEN_AFTER_CLOSE |
|
| 72 |
+ |
|
| 58 | 73 |
To protect a socket the OpenVPN will send a PROTECTFD to the UI. |
| 59 | 74 |
When sending the PROTECTFD command command to the UI it will send |
| 60 | 75 |
the fd of the socket as ancillary message over the UNIX socket. |