Add the DNS query hook to net context
This change
- adds a query hook to android_net_context
- exposes relevant definitions to netd
- corrects a bug in query hooks' interaction with the cache
This change does not introduce any code to read the query hook
from the net context or make use of it.
Bug: 34953048
Test: Netd test suite passes
Change-Id: Ie091980e22ce9da07a3c4d387b371e544379d762
diff --git a/libc/dns/include/resolv_netid.h b/libc/dns/include/resolv_netid.h
index 37c1891..ae94768 100644
--- a/libc/dns/include/resolv_netid.h
+++ b/libc/dns/include/resolv_netid.h
@@ -34,6 +34,7 @@
*/
#include <sys/cdefs.h>
#include <netinet/in.h>
+#include "resolv_params.h"
#include <stdio.h>
/*
@@ -71,6 +72,7 @@
unsigned dns_netid;
unsigned dns_mark;
uid_t uid;
+ res_send_qhook qhook;
};
#define NET_CONTEXT_INVALID_UID ((uid_t)-1)