diff options
author | Sreeram Ramachandran <sreeram@google.com> | 2014-10-23 09:38:19 -0700 |
---|---|---|
committer | Lorenzo Colitti <lorenzo@google.com> | 2014-12-17 16:26:38 +0900 |
commit | 2008e147e5c58ac6f81bc2bac87fbc1313d5a38c (patch) | |
tree | bc34a841dc1864505d0c5ca9cb1718658f6c3b2d | |
parent | b20719ebf403b16d36a231aeef96607f8c7aa252 (diff) | |
download | android_external_android-clat-2008e147e5c58ac6f81bc2bac87fbc1313d5a38c.tar.gz android_external_android-clat-2008e147e5c58ac6f81bc2bac87fbc1313d5a38c.tar.bz2 android_external_android-clat-2008e147e5c58ac6f81bc2bac87fbc1313d5a38c.zip |
Cleanup: Remove unused "ipv6_local_address".
This was originally used on the "clat" interface. That interface is not created
anymore (since the switch to using a raw socket). Note that the v6 address used
on the raw socket is a combination of the plat subnet plus a host ID, and not
this link-local address.
Also fixup default values to match clatd.conf values.
(cherry picked from commit c0a8ce0d1ddcd3196c213e6df595955835a6942e)
Change-Id: I3470a02e6798b65cae0f8d7f074ce51fb0647e6a
-rw-r--r-- | clatd.conf | 3 | ||||
-rw-r--r-- | config.c | 6 | ||||
-rw-r--r-- | config.h | 6 |
3 files changed, 3 insertions, 12 deletions
@@ -5,9 +5,6 @@ ipv6_host_id ::464 # ipv4 subnet for the local traffic to use. This is a /32 host address ipv4_local_subnet 192.0.0.4 -# ipv6 extra link local address for the ip6 iface. -ipv6_local_address fe80::c000:0004 - # get the plat_subnet from dns lookups (requires DNS64) plat_from_dns64 yes # hostname to use to lookup plat subnet. must contain only A records @@ -196,7 +196,7 @@ void config_generate_local_ipv6_subnet(struct in6_addr *interface_ip) { int subnet_from_interface(cnode *root, const char *interface) { union anyip *interface_ip; - if(!config_item_ip6(root, "ipv6_host_id", "::200:5E10:0:0", &Global_Clatd_Config.ipv6_host_id)) + if(!config_item_ip6(root, "ipv6_host_id", "::464", &Global_Clatd_Config.ipv6_host_id)) return 0; interface_ip = getinterface_ip(interface, AF_INET6); @@ -252,9 +252,6 @@ int read_config(const char *file, const char *uplink_interface, const char *plat if(!config_item_ip(root, "ipv4_local_subnet", DEFAULT_IPV4_LOCAL_SUBNET, &Global_Clatd_Config.ipv4_local_subnet)) goto failed; - if(!config_item_ip6(root, "ipv6_local_address", DEFAULT_IPV6_LOCAL_ADDRESS, &Global_Clatd_Config.ipv6_local_address)) - goto failed; - if(plat_prefix) { // plat subnet is coming from the command line if(inet_pton(AF_INET6, plat_prefix, &Global_Clatd_Config.plat_subnet) <= 0) { logmsg(ANDROID_LOG_FATAL,"invalid IPv6 address specified for plat prefix: %s", plat_prefix); @@ -295,7 +292,6 @@ void dump_config() { logmsg(ANDROID_LOG_DEBUG,"mtu = %d",Global_Clatd_Config.mtu); logmsg(ANDROID_LOG_DEBUG,"ipv4mtu = %d",Global_Clatd_Config.ipv4mtu); - logmsg(ANDROID_LOG_DEBUG,"ipv6_local_address = %s",inet_ntop(AF_INET6, &Global_Clatd_Config.ipv6_local_address, charbuffer, sizeof(charbuffer))); logmsg(ANDROID_LOG_DEBUG,"ipv6_local_subnet = %s",inet_ntop(AF_INET6, &Global_Clatd_Config.ipv6_local_subnet, charbuffer, sizeof(charbuffer))); logmsg(ANDROID_LOG_DEBUG,"ipv4_local_subnet = %s",inet_ntop(AF_INET, &Global_Clatd_Config.ipv4_local_subnet, charbuffer, sizeof(charbuffer))); logmsg(ANDROID_LOG_DEBUG,"plat_subnet = %s",inet_ntop(AF_INET6, &Global_Clatd_Config.plat_subnet, charbuffer, sizeof(charbuffer))); @@ -21,14 +21,12 @@ #include <netinet/in.h> #include <sys/system_properties.h> -#define DEFAULT_IPV4_LOCAL_SUBNET "192.168.255.1" -#define DEFAULT_IPV6_LOCAL_ADDRESS "fe80::c000:0004" +#define DEFAULT_IPV4_LOCAL_SUBNET "192.0.0.4" -#define DEFAULT_DNS64_DETECTION_HOSTNAME "ipv4.google.com" +#define DEFAULT_DNS64_DETECTION_HOSTNAME "ipv4only.arpa" struct clat_config { int16_t mtu, ipv4mtu; - struct in6_addr ipv6_local_address; struct in6_addr ipv6_local_subnet; struct in6_addr ipv6_host_id; struct in_addr ipv4_local_subnet; |