Always push all state to dnsmasq
Test: as follows
- built, flashed, booted
- manual use of tethering
Bug: 31634369
Bug: 36988090
Bug: 64090733
Bug: 79956831
Change-Id: I27f572dab0e3ddbe4b7586363a0bd05a3e66403c
diff --git a/server/TetherController.h b/server/TetherController.h
index c824e74..e163ae8 100644
--- a/server/TetherController.h
+++ b/server/TetherController.h
@@ -52,6 +52,20 @@
int mDaemonFd = -1;
std::set<std::string> mForwardingRequests;
+ struct DnsmasqState {
+ static int sendCmd(int daemonFd, const std::string& cmd);
+
+ // List of downstream interfaces on which to serve. The format used is:
+ // update_ifaces|<ifname1>|<ifname2>|...
+ std::string update_ifaces_cmd;
+ // Forwarding (upstream) DNS configuration to use. The format used is:
+ // update_dns|<hex_socket_mark>|<ip1>|<ip2>|...
+ std::string update_dns_cmd;
+
+ void clear();
+ int sendAllState(int daemonFd) const;
+ } mDnsmasqState{};
+
public:
TetherController();