OSDN Git Service

Track NAT64 in the framework and start clatd iff NAT64 detected
authorLorenzo Colitti <lorenzo@google.com>
Tue, 8 Jan 2019 01:04:25 +0000 (10:04 +0900)
committerLorenzo Colitti <lorenzo@google.com>
Mon, 25 Feb 2019 02:42:00 +0000 (11:42 +0900)
commit6998fa8a17756b36d925446bb5e1f3ec4993200f
treee8c180a879d94016f0af4756b676c5b4dbf62070
parentdf59563de231e19d56e04c5691ad9b67031a576e
Track NAT64 in the framework and start clatd iff NAT64 detected

Currently, both netd and clatd do NAT64 prefix detection, and we
start clatd on all IPv6-only networks regardless of whether netd
has detected a NAT64 prefix or not.

Instead, track the NAT64 prefix in the framework, and only start
clatd if the prefix is detected. This will allow us to remove
DNS64 detection in clatd, and pass the NAT64 prefix and the IPv6
address to clatd on the command line instead of clatd finding it
itself. That way, netd and the framework will always know how
464xlat is configured, and we'll be able to use that information
in netd.

Test: builds, boots
Test: atest FrameworksNetTests
Change-Id: Ida32d5760c5aecf7aeebef08fdb596291b2ce14a
services/core/java/com/android/server/ConnectivityService.java
services/core/java/com/android/server/connectivity/Nat464Xlat.java
tests/net/java/com/android/server/ConnectivityServiceTest.java
tests/net/java/com/android/server/connectivity/Nat464XlatTest.java