remove configuration option 'plat_from_dns64_hostname'
RFC 7050 has been a standard for so long, and is likely used
by so many other implementations, that it doesn't seem to make
sense to use anything else then 'ipv4only.arpa' (also that's
what netd uses, and this code here is really dead, since
in Q we moved the detection out of clatd and into netd).
Test: builds,
'git grep free_config' comes up empty
'git grep plat_from_dns64_hostname' comes up empty
Bug: 144730808
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ibf0c8d5e2cec6359fba1f7dd8867bd2742f362b4
diff --git a/config.c b/config.c
index a859092..3ea510d 100644
--- a/config.c
+++ b/config.c
@@ -150,16 +150,6 @@
return ret_val_ptr;
}
-/* function: free_config
- * frees the memory used by the global config variable
- */
-void free_config() {
- if (Global_Clatd_Config.plat_from_dns64_hostname) {
- free(Global_Clatd_Config.plat_from_dns64_hostname);
- Global_Clatd_Config.plat_from_dns64_hostname = NULL;
- }
-}
-
/* function: ipv6_prefix_equal
* compares the prefixes two ipv6 addresses. assumes the prefix lengths are both /64.
* a1 - first address
@@ -180,7 +170,7 @@
backoff_sleep = 1;
while (1) {
- status = plat_prefix(Global_Clatd_Config.plat_from_dns64_hostname, net_id, &tmp_ptr);
+ status = plat_prefix(DNS64_DETECTION_HOSTNAME, net_id, &tmp_ptr);
if (status > 0) {
memcpy(&Global_Clatd_Config.plat_subnet, &tmp_ptr, sizeof(struct in6_addr));
return;
@@ -357,9 +347,6 @@
} else {
free(tmp_ptr);
- if (!(Global_Clatd_Config.plat_from_dns64_hostname =
- config_item_str(root, "plat_from_dns64_hostname", DEFAULT_DNS64_DETECTION_HOSTNAME)))
- goto failed;
dns64_detection(net_id);
}
}
@@ -381,7 +368,6 @@
failed:
free(root);
- free_config();
return 0;
}