Remove DNS64 detection code from clatd.
This has been unused since Q, when the NAT64 prefix started being
detected and passed in by netd instead. Many things depend on the
prefix being correct, including clat BPF offload and DNS64
synthesis, and doing DNS64 detection in clatd provides no way to
make these work. Additionally, R now supports getting the NAT64
prefix via the RA, which makes DNS64 detection in clatd even less
useful.
This CL removes all the DNS64 detection code. The new code parses
the prefix in main.c, and if the prefix is not valid, refuses to
start.
This also lets us remove the -n <netid> parameter which was only
used for DNS64 detection.
It also removes a dependency on dnsproxyd_protocol_headers, which
should be depended on by as few parts of the system as possible.
Test: m
Bug: 144730808
Bug: 151895202
Test: IPv6-only wifi continues to work
Change-Id: I892f364d6cbfe76277686387e35c04d3d6eb5ecc
diff --git a/config.h b/config.h
index d5c4399..c47fc88 100644
--- a/config.h
+++ b/config.h
@@ -23,7 +23,6 @@
#define DEFAULT_IPV4_LOCAL_SUBNET "192.0.0.4"
#define DEFAULT_IPV4_LOCAL_PREFIXLEN "29"
-#define DNS64_DETECTION_HOSTNAME "ipv4only.arpa"
struct clat_config {
struct in6_addr ipv6_local_subnet;
@@ -37,8 +36,7 @@
extern struct clat_config Global_Clatd_Config;
-int read_config(const char *file, const char *uplink_interface, const char *plat_prefix,
- unsigned net_id);
+int read_config(const char *file, const char *uplink_interface);
void config_generate_local_ipv6_subnet(struct in6_addr *interface_ip);
in_addr_t config_select_ipv4_address(const struct in_addr *ip, int16_t prefixlen);
int ipv6_prefix_equal(struct in6_addr *a1, struct in6_addr *a2);