return binder::Status::ok();
}
+binder::Status NetdNativeService::tetherApplyDnsInterfaces(bool *ret) {
+ NETD_BIG_LOCK_RPC(CONNECTIVITY_INTERNAL);
+
+ *ret = gCtls->tetherCtrl.applyDnsInterfaces();
+ return binder::Status::ok();
+}
+
} // namespace net
} // namespace android
binder::Status getResolverInfo(int32_t netId, std::vector<std::string>* servers,
std::vector<std::string>* domains, std::vector<int32_t>* params,
std::vector<int32_t>* stats) override;
+
+ // Tethering-related commands.
+ binder::Status tetherApplyDnsInterfaces(bool *ret) override;
};
} // namespace net
int tetherInterface(const char *interface);
int untetherInterface(const char *interface);
const std::list<std::string> &getTetheredInterfaceList() const;
+ bool applyDnsInterfaces();
private:
- bool applyDnsInterfaces();
bool setIpFwdEnabled();
};
*/
void getResolverInfo(int netId, out @utf8InCpp String[] servers,
out @utf8InCpp String[] domains, out int[] params, out int[] stats);
+
+ /**
+ * Instruct the tethering DNS server to reevaluated serving interfaces.
+ * This is needed to for the DNS server to observe changes in the set
+ * of potential listening IP addresses. (Listening on wildcard addresses
+ * can turn the device into an open resolver; b/7530468)
+ *
+ * TODO: Return something richer than just a boolean.
+ */
+ boolean tetherApplyDnsInterfaces();
}