summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2017-09-05 08:03:34 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2017-09-05 08:03:34 +0000
commit28a6129b6cf569f5e4f6ade38b7baed716881189 (patch)
tree8d6ee6e3fd25fa17f91ad8b6ed8b20b160a49085
parentad146e6aa3410935caca92678f4a190656c8114a (diff)
parentb1bc5e7f49baaaaea9d45975b8946ed6093710f0 (diff)
downloadplatform_external_android-clat-28a6129b6cf569f5e4f6ade38b7baed716881189.tar.gz
platform_external_android-clat-28a6129b6cf569f5e4f6ade38b7baed716881189.tar.bz2
platform_external_android-clat-28a6129b6cf569f5e4f6ade38b7baed716881189.zip
release-request-fe3c4418-17ca-4f25-abb0-4ebd39ddf162-for-git_pi-release-4315938 snap-temp-L58200000099370312
Change-Id: I2e69b2328beeef00aa94f21438c01a694d1686dd
-rw-r--r--config.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/config.c b/config.c
index b147868..2d7085b 100644
--- a/config.c
+++ b/config.c
@@ -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;
}
}
}