diff options
author | Ben Schwartz <bemasc@google.com> | 2018-01-29 11:21:11 -0500 |
---|---|---|
committer | Erik Kline <ek@google.com> | 2018-03-21 07:57:14 -0700 |
commit | a56793c238d1f112d915492063aca182207b58d4 (patch) | |
tree | cd2bbbb5695eabc6d73ebbc00967da387d7cbb1b | |
parent | 9864564fcaaf2f56dad0f2c3d942e3eb6ac625d6 (diff) | |
download | bionic-a56793c238d1f112d915492063aca182207b58d4.tar.gz |
Enable EDNS and the DO-bit if the netcontext asks
This effectively enables these features only in TLS mode
Test: Integration tests pass
Bug: 69623036
Bug: 64133961
Merged-In: Idbfbc0343e21ad713d9b4204fc48d63fb5b8dcd4
Merged-In: Ie3ae2390f01dbdcccf55fdd4e87b8a258702cfbc
Change-Id: I153a259b0c07717f664ee268b43da867a9b42152
(cherry picked from commit e7190ce3f23e6fd0d724765e0bb20f1ed0cfabf0)
-rw-r--r-- | libc/dns/resolv/res_init.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libc/dns/resolv/res_init.c b/libc/dns/resolv/res_init.c index 302a62be3..2fb2a3d4c 100644 --- a/libc/dns/resolv/res_init.c +++ b/libc/dns/resolv/res_init.c @@ -774,6 +774,9 @@ void res_setnetcontext(res_state statp, const struct android_net_context *netcon statp->netid = netcontext->dns_netid; statp->_mark = netcontext->dns_mark; statp->qhook = netcontext->qhook; + if (netcontext->flags & NET_CONTEXT_FLAG_USE_EDNS) { + statp->options |= RES_USE_EDNS0 | RES_USE_DNSSEC; + } } } |