commit | 90a83beb4dd3a70aeb512a786e9a79bbd641f4de | [log] [tgz] |
---|---|---|
author | Ben Schwartz <bemasc@google.com> | Mon Apr 24 17:57:11 2017 -0400 |
committer | Ben Schwartz <bemasc@google.com> | Mon May 22 18:37:25 2017 -0400 |
tree | 6e8c1e3867def69f895bde71df8890ec8e6e279c | |
parent | 6e7f14d9f707c295765e119800acfa0621a347cb [diff] [blame] |
Make use of the DNS query hook in the netcontext This will allow netd to run queries over TLS: https://android-review.googlesource.com/#/c/391513/ https://android-review.googlesource.com/#/c/380593/ Bug: 34953048 Test: Device tests pass. No issues during manual testing. Change-Id: I8d613322307fc40cdba59b82599eda753697278f
diff --git a/libc/dns/resolv/res_init.c b/libc/dns/resolv/res_init.c index b9fc131..302a62b 100644 --- a/libc/dns/resolv/res_init.c +++ b/libc/dns/resolv/res_init.c
@@ -768,17 +768,12 @@ } #ifdef ANDROID_CHANGES -void res_setnetid(res_state statp, unsigned netid) +void res_setnetcontext(res_state statp, const struct android_net_context *netcontext) { if (statp != NULL) { - statp->netid = netid; - } -} - -void res_setmark(res_state statp, unsigned mark) -{ - if (statp != NULL) { - statp->_mark = mark; + statp->netid = netcontext->dns_netid; + statp->_mark = netcontext->dns_mark; + statp->qhook = netcontext->qhook; } }