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)
Change-Id: Ibb3e3e1ce0b43cb74962dd4436a47e9b458fa19a
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;
{