Drop the dependency of Fwmark
The resolver used to generate the desired network mark for
DoT sockets. Now, change to get the network mark from netd.
Bug: 151895202
Test: Private DNS works as usual (even on VPN)
Merged-In: Ibb3e3e1ce0b43cb74962dd4436a47e9b458fa19a
Change-Id: I9698b3c73e410fce79dac044919f874768fc6a04
(cherry picked from commit ab43958ef7dbdf10b5ba310bc436173a0785f58f)
diff --git a/DnsTlsDispatcher.cpp b/DnsTlsDispatcher.cpp
index 8747e46..1fa4001 100644
--- a/DnsTlsDispatcher.cpp
+++ b/DnsTlsDispatcher.cpp
@@ -147,6 +147,10 @@
const Slice query, const Slice ans, int* resplen,
bool* connectTriggered) {
int connectCounter;
+
+ // TODO: This can cause the resolver to create multiple connections to the same DoT server
+ // merely due to different mark, such as the bit explicitlySelected unset.
+ // See if we can save them and just create one connection for one DoT server.
const Key key = std::make_pair(mark, server);
Transport* xport;
{