Implement support for bypassable VPNs.
Bypassable VPNs grab all traffic by default (just like secure VPNs), but:
+ They allow all apps to choose other networks using the multinetwork APIs.
If these other networks are insecure ("untrusted"), they will enforce that the
app holds the necessary permissions, such as CHANGE_NETWORK_STATE.
+ They support consistent routing. If an app has an existing connection over
some other network when the bypassable VPN comes up, it's not interrupted.
Bug: 15347374
Change-Id: Iaee9c6f6fa8103215738570d2b65d3fcf10343f3
diff --git a/server/NetworkController.h b/server/NetworkController.h
index f0b42c4..f065ba5 100644
--- a/server/NetworkController.h
+++ b/server/NetworkController.h
@@ -56,7 +56,7 @@
bool isVirtualNetwork(unsigned netId) const;
int createPhysicalNetwork(unsigned netId, Permission permission) WARN_UNUSED_RESULT;
- int createVirtualNetwork(unsigned netId, bool hasDns) WARN_UNUSED_RESULT;
+ int createVirtualNetwork(unsigned netId, bool hasDns, bool secure) WARN_UNUSED_RESULT;
int destroyNetwork(unsigned netId) WARN_UNUSED_RESULT;
int addInterfaceToNetwork(unsigned netId, const char* interface) WARN_UNUSED_RESULT;