Address outstanding comments from aosp/713992
Test: as follows
- built, flashed, booted
- system/netd/tests/runtest.sh passes
- connected to a DNS64 network and observed prefix discovery
via "adb shell dumpsys netd"
Bug: 78545619
Change-Id: I7ae6bf258bb3f22795274026187ee8493875aace
diff --git a/server/ResolverController.cpp b/server/ResolverController.cpp
index 65e3d69..506eb8a 100644
--- a/server/ResolverController.cpp
+++ b/server/ResolverController.cpp
@@ -554,6 +554,11 @@
// Operators may choose to use a longer TTL in order to reduce repeated
// resolution (see also https://tools.ietf.org/html/rfc7050#section-5).
if (allIPv6Only(servers)) {
+ // TODO: Keep any existing discovered prefix around for use while
+ // re-discovery is in progress. Otherwise, whenever DNS servers are
+ // pushed to netd there can be gaps where it would appear there was
+ // no prefix64 when in fact we had previously discovered one (and
+ // are highly likely to rediscover the same one).
mDns64Configuration.startPrefixDiscovery(netId);
} else {
mDns64Configuration.stopPrefixDiscovery(netId);