cleanup - ipv6_host_id and is_dynamic_iid
Test:
git grep 'ipv6_host_id|is_dynamic_iid'
comes up empty
Bug: 144730808
Test: atest clatd_test netd_integration_test
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ie3ed4583a95f15165a05412a556bae99dc07706b
diff --git a/clatd_test.cpp b/clatd_test.cpp
index 8f10e32..e24b036 100644
--- a/clatd_test.cpp
+++ b/clatd_test.cpp
@@ -585,8 +585,6 @@
inet_pton(AF_INET, kIPv4LocalAddr, &Global_Clatd_Config.ipv4_local_subnet);
inet_pton(AF_INET6, kIPv6PlatSubnet, &Global_Clatd_Config.plat_subnet);
memset(&Global_Clatd_Config.ipv6_local_subnet, 0, sizeof(in6_addr));
- Global_Clatd_Config.ipv6_host_id = in6addr_any;
- Global_Clatd_Config.use_dynamic_iid = 1;
Global_Clatd_Config.default_pdp_interface = const_cast<char *>(sTun.name().c_str());
}
@@ -854,7 +852,6 @@
TEST_F(ClatdTest, TranslateChecksumNeutral) {
// Generate a random clat IPv6 address and check that translation is checksum-neutral.
- Global_Clatd_Config.ipv6_host_id = in6addr_any;
ASSERT_TRUE(inet_pton(AF_INET6, "2001:db8:1:2:f076:ae99:124e:aa54",
&Global_Clatd_Config.ipv6_local_subnet));
diff --git a/config.c b/config.c
index 1c380dc..eea12f7 100644
--- a/config.c
+++ b/config.c
@@ -165,7 +165,6 @@
*/
int read_config(const char *file, const char *uplink_interface) {
cnode *root = config_node("", "");
- unsigned flags;
if (!root) {
logmsg(ANDROID_LOG_FATAL, "out of memory");
@@ -191,19 +190,6 @@
&Global_Clatd_Config.ipv4_local_prefixlen))
goto failed;
- if (!config_item_ip6(root, "ipv6_host_id", "::", &Global_Clatd_Config.ipv6_host_id)) goto failed;
-
- /* In order to prevent multiple devices attempting to use the same clat address, never use a
- statically-configured interface ID on a broadcast interface such as wifi. */
- if (!IN6_IS_ADDR_UNSPECIFIED(&Global_Clatd_Config.ipv6_host_id)) {
- ifc_init();
- ifc_get_info(Global_Clatd_Config.default_pdp_interface, NULL, NULL, &flags);
- ifc_close();
- Global_Clatd_Config.use_dynamic_iid = (flags & IFF_BROADCAST) != 0;
- } else {
- Global_Clatd_Config.use_dynamic_iid = 1;
- }
-
return 1;
failed:
diff --git a/config.h b/config.h
index 50efeeb..9231906 100644
--- a/config.h
+++ b/config.h
@@ -26,12 +26,10 @@
struct clat_config {
struct in6_addr ipv6_local_subnet;
- struct in6_addr ipv6_host_id;
struct in_addr ipv4_local_subnet;
int16_t ipv4_local_prefixlen;
struct in6_addr plat_subnet;
char *default_pdp_interface;
- int use_dynamic_iid;
};
extern struct clat_config Global_Clatd_Config;