summaryrefslogtreecommitdiffstats
path: root/config.c
diff options
context:
space:
mode:
authorErik Kline <ek@google.com>2014-09-22 13:32:27 +0900
committerErik Kline <ek@google.com>2014-09-24 16:02:31 +0900
commit0ec5dfa1da6a97532dc8cca825bae4edfb7d3dce (patch)
tree34185fdc8520137e7aaa4e711f4f6bf4511da514 /config.c
parentdce3ddf54083ccd0e3752c4c08013688f79baa7a (diff)
downloadplatform_external_android-clat-0ec5dfa1da6a97532dc8cca825bae4edfb7d3dce.tar.gz
platform_external_android-clat-0ec5dfa1da6a97532dc8cca825bae4edfb7d3dce.tar.bz2
platform_external_android-clat-0ec5dfa1da6a97532dc8cca825bae4edfb7d3dce.zip
- Only request AAAAs for the IPv4-only hostname, since that's all the information being used. Perhaps at some point in the future when _validation_ of the IPv4 address(es)'s presence within the IPv6 address(es) is being done this should be revisited. - Only use the first AAAA returned to find the DNS64 prefix. It's not clear how to properly resolve any potential DNS64 prefix conflicts anyway. - Re-try DNS64 prefix discovery on any type of error. If clatd was started (presumably an IPv6-only network), retry DNS64 prefix discovery with exponential backoff. Some "permanent" errors can be indistinguishable from transient errors (e.g. receiving an erroneous SERVFAIL from a DNS resolver, ...). - Fix-up back-off logic to not sleep 128 then 120, 120, ... :-) Bug: 17569702 Change-Id: I226ea7772cd7c88d2b60153ef76e5435400e11aa
Diffstat (limited to 'config.c')
-rw-r--r--config.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/config.c b/config.c
index d8bec80..13889a0 100644
--- a/config.c
+++ b/config.c
@@ -165,16 +165,11 @@ void dns64_detection(unsigned net_id) {
memcpy(&Global_Clatd_Config.plat_subnet, &tmp_ptr, sizeof(struct in6_addr));
return;
}
- if(status < 0) {
- logmsg(ANDROID_LOG_FATAL, "dns64_detection/no dns64, giving up\n");
- exit(1);
- }
- logmsg(ANDROID_LOG_WARN, "dns64_detection failed, sleeping for %d seconds", backoff_sleep);
+ 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;
- } else {
- backoff_sleep *= 2;
}
}
}