commit | 622a36923ec2778dec0f195fec5cdc2056e65fca | [log] [tgz] |
---|---|---|
author | Ben Schwartz <bemasc@google.com> | Mon Feb 05 17:54:06 2018 -0500 |
committer | Erik Kline <ek@google.com> | Mon Apr 02 15:31:30 2018 -0700 |
tree | 8aa910e6031963a882c1d733df6d5ac5f855114a | |
parent | d65576d406a1625847712b0534cf81443f08a4cc [diff] |
Pad queries when EDNS0 is enabled. Behavior is compliant with https://tools.ietf.org/html/draft-ietf-dprive-padding-policy-04 EDNS0 is only enabled when the netcontext requests it, i.e. in DNS-over-TLS mode. Bug: 69623036 Bug: 64133961 Test: Wireshark verified. Integration tests echo padding and pass. Merged-In: Ie5439b0ad505ebf393a83c87845fd02549afc4a2 Merged-In: I274d659782870818274526d23d3a3c4640cad92d Change-Id: I5ef600e02a572d281441e890cc981614f150629b (cherry picked from commit 23e4081009bb58d9c09e615186208b77749e72de)
diff --git a/libc/dns/include/resolv_params.h b/libc/dns/include/resolv_params.h index 1b9d433..3c07d8a 100644 --- a/libc/dns/include/resolv_params.h +++ b/libc/dns/include/resolv_params.h
@@ -34,6 +34,10 @@ * servers. */ +/* If EDNS0_PADDING is defined, queries will be padded to a multiple of this length +when EDNS0 is active. */ +#define EDNS0_PADDING 128 + /* per-netid configuration parameters passed from netd to the resolver */ struct __res_params { uint16_t sample_validity; // sample lifetime in s