Fix WiFi-Direct and Tethering.
A LocalNetwork object now always exists in the NetworkController, with a fixed
NetId that's guaranteed not to collide with NetIds created by the framework.
When routes are added on an interface tracked by the LocalNetwork, they are
added to a fixed "local_network" table.
When NAT is enabled, we add a special "iif -> oif" tethering rule.
Bug: 15413694
Bug: 15413741
Change-Id: I36effc438d5ac193a77174493bf196cb68a5b97a
diff --git a/server/TetherController.h b/server/TetherController.h
index 38f7593..4da10b0 100644
--- a/server/TetherController.h
+++ b/server/TetherController.h
@@ -24,17 +24,14 @@
typedef android::netd::List<char *> InterfaceCollection;
typedef android::netd::List<struct in_addr> NetAddressCollection;
-class NetworkController;
-
class TetherController {
InterfaceCollection *mInterfaces;
NetAddressCollection *mDnsForwarders;
pid_t mDaemonPid;
int mDaemonFd;
- NetworkController* const mNetworkController;
public:
- explicit TetherController(NetworkController* networkController);
+ TetherController();
virtual ~TetherController();
int setIpFwdEnabled(bool enable);