commit | f3c4207551b096dfa148fc5fe3382f96dc970ca1 | [log] [tgz] |
---|---|---|
author | Ken Chen <cken@google.com> | Wed Mar 30 01:09:49 2022 +0800 |
committer | Ken Chen <cken@google.com> | Thu Apr 07 11:07:41 2022 +0000 |
tree | 56b044544dcaae761b6da42576eea5f9ea1f6c65 | |
parent | 637d771880a98d2feb5a9d1839ad59d048722ebb [diff] |
Don't use 5353 source port for mDNS queries RFC 6762 section 5.1 says that one-shot Multicast DNS queries MUST NOT be sent using UDP source port 5353, since using UDP source port 5353 signals the presence of a fully compliant Multicast DNS querier. DNS resolver works as a one-shot Multicast DNS querier, which send queries from random port and does not fully implement Multicast DNS features. The 5353 source port should be excluded from random port selection. Bug: 227147672 Test: atest Change-Id: I05d426c179182d3f08b037cb1bab3a43ea501063
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.