Add a socket mark parameter to tethering DNS commands.
This allows the framework to pass down to dnsmasq the socket mark
to use for DNS queries.
Bug: 16357676
Change-Id: I8933b6de198a92c2aaf0291931ace8966ddba275
diff --git a/server/TetherController.h b/server/TetherController.h
index 4da10b0..1c32627 100644
--- a/server/TetherController.h
+++ b/server/TetherController.h
@@ -26,6 +26,9 @@
class TetherController {
InterfaceCollection *mInterfaces;
+ // NetId to use for forwarded DNS queries. This may not be the default
+ // network, e.g., in the case where we are tethering to a DUN APN.
+ unsigned mDnsNetId;
NetAddressCollection *mDnsForwarders;
pid_t mDaemonPid;
int mDaemonFd;
@@ -42,7 +45,8 @@
int stopTethering();
bool isTetheringStarted();
- int setDnsForwarders(char **servers, int numServers);
+ unsigned getDnsNetId();
+ int setDnsForwarders(unsigned netId, char **servers, int numServers);
NetAddressCollection *getDnsForwarders();
int tetherInterface(const char *interface);