diff options
author | Lorenzo Colitti <lorenzo@google.com> | 2017-06-21 18:23:18 +0900 |
---|---|---|
committer | Lorenzo Colitti <lorenzo@google.com> | 2017-09-05 17:25:01 +0900 |
commit | 5fcb58ea1174aefb6f0a41eb273d78e72fdb5a97 (patch) | |
tree | 8d6ee6e3fd25fa17f91ad8b6ed8b20b160a49085 | |
parent | ad146e6aa3410935caca92678f4a190656c8114a (diff) | |
download | platform_external_android-clat-5fcb58ea1174aefb6f0a41eb273d78e72fdb5a97.tar.gz platform_external_android-clat-5fcb58ea1174aefb6f0a41eb273d78e72fdb5a97.tar.bz2 platform_external_android-clat-5fcb58ea1174aefb6f0a41eb273d78e72fdb5a97.zip |
Increase the maximum exponential backoff for DNS64 queries.oreo-mr1-dev
Currently, we only scale down DNS64 detection queries to one
every two minutes. This wastes power on true IPv6-only networks
such as the IMS networks of many operators. The only possible
benefit is that if a NAT64 were to appear on a previously
IPv6-only network, we detect it within two minutes.
Set the maximum backoff to one query per 30 minutes, while
maintaining the exponential backoff starting at 1 second.
(cherry picked from commit d1383bd268946d0c54e50e981b7d5c2c85509df4)
Bug: 62650901
Test: bullhead successfully detects NAT64 network
Change-Id: Ib6a7df5b25690d8b564079efbcaf8325c37c2e48
-rw-r--r-- | config.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -180,8 +180,11 @@ void dns64_detection(unsigned net_id) { logmsg(ANDROID_LOG_WARN, "dns64_detection -- error, sleeping for %d seconds", backoff_sleep); sleep(backoff_sleep); backoff_sleep *= 2; - if(backoff_sleep >= 120) { - backoff_sleep = 120; + if(backoff_sleep >= 1800) { + // Scale down to one DNS query per half hour. Unnecessary DNS queries waste power, and the + // benefit is minimal (basically, only limited to the case where a network goes from IPv6-only + // to IPv6 with NAT64). + backoff_sleep = 1800; } } } |