commit | 5e1b99187ecb5b6db507320475fd0464d2a24d83 | [log] [tgz] |
---|---|---|
author | Mike Yu <yumike@google.com> | Tue Nov 10 16:50:13 2020 +0800 |
committer | Mike Yu <yumike@google.com> | Thu Nov 12 20:06:16 2020 +0800 |
tree | a3f8210fcece233e99113d8bc39b6558b3dfcb70 | |
parent | ac9499079f1f45a8d619c29805ec27c46f900a2e [diff] |
Fix DnsTlsSocket to consume all pending data from ssl When servers reply multiple DNS responses in one packet, DnsTlsSocket handles only the first DNS response. The remaining DNS responses are still in ssl buffer. This causes a bug that there will be at least one DNS reponse in ssl buffer, which results in at least one DNS request timeout. This change fixes it by always consuming the data from ssl before next poll. Bug: 172778187 Bug: 168027339 Bug: 171413368 Test: cd packages/modules/DnsResolver && atest Change-Id: I72807e43636a46d30df6a694bb906313a8de63f2
This code uses LOG(X) for logging. Log levels are VERBOSE,DEBUG,INFO,WARNING and ERROR. The default setting is WARNING and logs relate to WARNING and ERROR will be shown. If you want to enable the DEBUG level logs, using following command. adb shell service call dnsresolver 10 i32 1 VERBOSE 0 DEBUG 1 INFO 2 WARNING 3 ERROR 4 Verbose resolver logs could contain PII -- do NOT enable in production builds.