Support DNS64 synthesis using externally-discovered prefixes.
Currently, the DNS resolver supports DNS64 synthesis only for prefixes that it discovered itself, and not for NAT64 prefixes discovered via other means (e.g., RA). Add a way to set a NAT64 prefix that was discovered by other means. This new IPC is mutually exclusive with the existing prefix discovery mechansisms: - Setting the prefix has no effect if prefix discovery is started. - Starting (or stopping) prefix discovery clears the prefix. - Setting the prefix does not result in any NAT64 prefix update callback. It is the responsibility of the caller (ConnectivityService, Nat464Xlat) to ensure that prefix discovery is stopped before setting the prefix. This does not add any significant complexity to the connectivity code, and it ensures that the behaviour of the existing IPCs (startPrefix64Discovery and stopPrefix64Discovery) are unchanged. This is necessary to ensure that DNS64 synthesis continues to work on Q devices. Disallowing concurrent use of prefix discovery and externally-set prefixes also simplifies the implementation because it allows reuse of most of the data structures and teardown code in Dns64Configuration. The externally-set prefix is represented by a Dns64Configuration with a special discovery ID of kNoDiscoveryId (== 0), which cannot be used by any discovery attempt. That way, if discovery is started, then stopped, and then the prefix is set, if a stale discovery thread then completes, it will be ignored because the thread's ID cannot be kNoDiscoveryId. Bug: 153694684 Bug: 156914456 Test: new tests in resolv_integration_test Change-Id: I7c63fb62b70635a1b5cc7a21d60f091ba2705d72
Loading
Please register or sign in to comment