blob: 1c1a1f7955de1b2edd9d235af002d349d22d31dc [file] [log] [blame]
Daniel Drowna45056e2012-03-23 10:42:54 -05001/*
2 * Copyright 2011 Daniel Drown
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 * config.c - configuration settings
17 */
18
Daniel Drowna45056e2012-03-23 10:42:54 -050019#include <arpa/inet.h>
Daniel Drowna45056e2012-03-23 10:42:54 -050020#include <errno.h>
junyulaic4e591a2018-11-26 22:36:10 +090021#include <limits.h>
22#include <stdio.h>
23#include <stdlib.h>
24#include <string.h>
Daniel Drowna45056e2012-03-23 10:42:54 -050025#include <unistd.h>
26
27#include <cutils/config_utils.h>
Lorenzo Colitti98de5952019-01-20 11:45:03 +090028#include <netutils/checksum.h>
Lorenzo Colitti2596f422014-11-10 17:00:02 -080029#include <netutils/ifc.h>
Daniel Drowna45056e2012-03-23 10:42:54 -050030
junyulaic4e591a2018-11-26 22:36:10 +090031#include "clatd.h"
Daniel Drowna45056e2012-03-23 10:42:54 -050032#include "config.h"
33#include "dns64.h"
Daniel Drowna45056e2012-03-23 10:42:54 -050034#include "getaddr.h"
junyulaic4e591a2018-11-26 22:36:10 +090035#include "logging.h"
Daniel Drowna45056e2012-03-23 10:42:54 -050036
37struct clat_config Global_Clatd_Config;
38
39/* function: config_item_str
junyulaic4e591a2018-11-26 22:36:10 +090040 * locates the config item and returns the pointer to a string, or NULL on failure. Caller frees
41 * pointer
42 * root - parsed configuration
43 * item_name - name of config item to locate
44 * defaultvar - value to use if config item isn't present
Daniel Drowna45056e2012-03-23 10:42:54 -050045 */
46char *config_item_str(cnode *root, const char *item_name, const char *defaultvar) {
47 const char *tmp;
48
junyulaic4e591a2018-11-26 22:36:10 +090049 if (!(tmp = config_str(root, item_name, defaultvar))) {
50 logmsg(ANDROID_LOG_FATAL, "%s config item needed", item_name);
Daniel Drowna45056e2012-03-23 10:42:54 -050051 return NULL;
52 }
53 return strdup(tmp);
54}
55
56/* function: config_item_int16_t
junyulaic4e591a2018-11-26 22:36:10 +090057 * locates the config item, parses the integer, and returns the pointer ret_val_ptr, or NULL on
58 * failure
59 * root - parsed configuration
60 * item_name - name of config item to locate
61 * defaultvar - value to use if config item isn't present
62 * ret_val_ptr - pointer for return value storage
Daniel Drowna45056e2012-03-23 10:42:54 -050063 */
junyulaic4e591a2018-11-26 22:36:10 +090064int16_t *config_item_int16_t(cnode *root, const char *item_name, const char *defaultvar,
65 int16_t *ret_val_ptr) {
Daniel Drowna45056e2012-03-23 10:42:54 -050066 const char *tmp;
67 char *endptr;
68 long int conf_int;
69
junyulaic4e591a2018-11-26 22:36:10 +090070 if (!(tmp = config_str(root, item_name, defaultvar))) {
71 logmsg(ANDROID_LOG_FATAL, "%s config item needed", item_name);
Daniel Drowna45056e2012-03-23 10:42:54 -050072 return NULL;
73 }
74
junyulaic4e591a2018-11-26 22:36:10 +090075 errno = 0;
76 conf_int = strtol(tmp, &endptr, 10);
77 if (errno > 0) {
78 logmsg(ANDROID_LOG_FATAL, "%s config item is not numeric: %s (error=%s)", item_name, tmp,
79 strerror(errno));
Daniel Drowna45056e2012-03-23 10:42:54 -050080 return NULL;
81 }
junyulaic4e591a2018-11-26 22:36:10 +090082 if (endptr == tmp || *tmp == '\0') {
83 logmsg(ANDROID_LOG_FATAL, "%s config item is not numeric: %s", item_name, tmp);
Daniel Drowna45056e2012-03-23 10:42:54 -050084 return NULL;
85 }
junyulaic4e591a2018-11-26 22:36:10 +090086 if (*endptr != '\0') {
87 logmsg(ANDROID_LOG_FATAL, "%s config item contains non-numeric characters: %s", item_name,
88 endptr);
Daniel Drowna45056e2012-03-23 10:42:54 -050089 return NULL;
90 }
junyulaic4e591a2018-11-26 22:36:10 +090091 if (conf_int > INT16_MAX || conf_int < INT16_MIN) {
92 logmsg(ANDROID_LOG_FATAL, "%s config item is too big/small: %d", item_name, conf_int);
Daniel Drowna45056e2012-03-23 10:42:54 -050093 return NULL;
94 }
95 *ret_val_ptr = conf_int;
96 return ret_val_ptr;
97}
98
99/* function: config_item_ip
junyulaic4e591a2018-11-26 22:36:10 +0900100 * locates the config item, parses the ipv4 address, and returns the pointer ret_val_ptr, or NULL on
101 * failure
102 * root - parsed configuration
103 * item_name - name of config item to locate
104 * defaultvar - value to use if config item isn't present
105 * ret_val_ptr - pointer for return value storage
Daniel Drowna45056e2012-03-23 10:42:54 -0500106 */
junyulaic4e591a2018-11-26 22:36:10 +0900107struct in_addr *config_item_ip(cnode *root, const char *item_name, const char *defaultvar,
108 struct in_addr *ret_val_ptr) {
Daniel Drowna45056e2012-03-23 10:42:54 -0500109 const char *tmp;
110 int status;
111
junyulaic4e591a2018-11-26 22:36:10 +0900112 if (!(tmp = config_str(root, item_name, defaultvar))) {
113 logmsg(ANDROID_LOG_FATAL, "%s config item needed", item_name);
Daniel Drowna45056e2012-03-23 10:42:54 -0500114 return NULL;
115 }
116
117 status = inet_pton(AF_INET, tmp, ret_val_ptr);
junyulaic4e591a2018-11-26 22:36:10 +0900118 if (status <= 0) {
119 logmsg(ANDROID_LOG_FATAL, "invalid IPv4 address specified for %s: %s", item_name, tmp);
Daniel Drowna45056e2012-03-23 10:42:54 -0500120 return NULL;
121 }
122
123 return ret_val_ptr;
124}
125
126/* function: config_item_ip6
junyulaic4e591a2018-11-26 22:36:10 +0900127 * locates the config item, parses the ipv6 address, and returns the pointer ret_val_ptr, or NULL on
128 * failure
129 * root - parsed configuration
130 * item_name - name of config item to locate
131 * defaultvar - value to use if config item isn't present
132 * ret_val_ptr - pointer for return value storage
Daniel Drowna45056e2012-03-23 10:42:54 -0500133 */
junyulaic4e591a2018-11-26 22:36:10 +0900134struct in6_addr *config_item_ip6(cnode *root, const char *item_name, const char *defaultvar,
135 struct in6_addr *ret_val_ptr) {
Daniel Drowna45056e2012-03-23 10:42:54 -0500136 const char *tmp;
137 int status;
138
junyulaic4e591a2018-11-26 22:36:10 +0900139 if (!(tmp = config_str(root, item_name, defaultvar))) {
140 logmsg(ANDROID_LOG_FATAL, "%s config item needed", item_name);
Daniel Drowna45056e2012-03-23 10:42:54 -0500141 return NULL;
142 }
143
144 status = inet_pton(AF_INET6, tmp, ret_val_ptr);
junyulaic4e591a2018-11-26 22:36:10 +0900145 if (status <= 0) {
146 logmsg(ANDROID_LOG_FATAL, "invalid IPv6 address specified for %s: %s", item_name, tmp);
Daniel Drowna45056e2012-03-23 10:42:54 -0500147 return NULL;
148 }
149
150 return ret_val_ptr;
151}
152
Lorenzo Colitti98089522014-10-09 22:29:45 +0900153/* function: ipv6_prefix_equal
154 * compares the prefixes two ipv6 addresses. assumes the prefix lengths are both /64.
junyulaic4e591a2018-11-26 22:36:10 +0900155 * a1 - first address
156 * a2 - second address
157 * returns: 0 if the subnets are different, 1 if they are the same.
Lorenzo Colitti98089522014-10-09 22:29:45 +0900158 */
junyulaic4e591a2018-11-26 22:36:10 +0900159int ipv6_prefix_equal(struct in6_addr *a1, struct in6_addr *a2) { return !memcmp(a1, a2, 8); }
Lorenzo Colitti98089522014-10-09 22:29:45 +0900160
Daniel Drowna45056e2012-03-23 10:42:54 -0500161/* function: dns64_detection
junyulaic4e591a2018-11-26 22:36:10 +0900162 * does dns lookups to set the plat subnet or exits on failure, waits forever for a dns response
163 * with a query backoff timer
164 * net_id - (optional) netId to use, NETID_UNSET indicates use of default network
Daniel Drowna45056e2012-03-23 10:42:54 -0500165 */
Paul Jensena1c871c2014-05-30 13:19:10 -0400166void dns64_detection(unsigned net_id) {
Bernhard Rosenkränzera33592b2013-12-12 10:28:16 +0100167 int backoff_sleep, status;
Daniel Drowna45056e2012-03-23 10:42:54 -0500168 struct in6_addr tmp_ptr;
169
170 backoff_sleep = 1;
171
junyulaic4e591a2018-11-26 22:36:10 +0900172 while (1) {
Maciej Żenczykowskib6b51042019-11-18 16:41:44 -0800173 status = plat_prefix(DNS64_DETECTION_HOSTNAME, net_id, &tmp_ptr);
junyulaic4e591a2018-11-26 22:36:10 +0900174 if (status > 0) {
Daniel Drowna45056e2012-03-23 10:42:54 -0500175 memcpy(&Global_Clatd_Config.plat_subnet, &tmp_ptr, sizeof(struct in6_addr));
176 return;
177 }
Erik Kline0ec5dfa2014-09-22 13:32:27 +0900178 logmsg(ANDROID_LOG_WARN, "dns64_detection -- error, sleeping for %d seconds", backoff_sleep);
Daniel Drowna45056e2012-03-23 10:42:54 -0500179 sleep(backoff_sleep);
Erik Kline0ec5dfa2014-09-22 13:32:27 +0900180 backoff_sleep *= 2;
junyulaic4e591a2018-11-26 22:36:10 +0900181 if (backoff_sleep >= 1800) {
Lorenzo Colittid1383bd2017-06-21 18:23:18 +0900182 // Scale down to one DNS query per half hour. Unnecessary DNS queries waste power, and the
183 // benefit is minimal (basically, only limited to the case where a network goes from IPv6-only
184 // to IPv6 with NAT64).
185 backoff_sleep = 1800;
Daniel Drowna45056e2012-03-23 10:42:54 -0500186 }
187 }
188}
189
Lorenzo Colitti798f9932014-10-31 21:54:33 +0900190/* function: gen_random_iid
191 * picks a random interface ID that is checksum neutral with the IPv4 address and the NAT64 prefix
junyulaic4e591a2018-11-26 22:36:10 +0900192 * myaddr - IPv6 address to write to
193 * ipv4_local_subnet - clat IPv4 address
194 * plat_subnet - NAT64 prefix
Lorenzo Colitti798f9932014-10-31 21:54:33 +0900195 */
Lorenzo Colitti98089522014-10-09 22:29:45 +0900196void gen_random_iid(struct in6_addr *myaddr, struct in_addr *ipv4_local_subnet,
197 struct in6_addr *plat_subnet) {
198 // Fill last 8 bytes of IPv6 address with random bits.
199 arc4random_buf(&myaddr->s6_addr[8], 8);
200
201 // Make the IID checksum-neutral. That is, make it so that:
202 // checksum(Local IPv4 | Remote IPv4) = checksum(Local IPv6 | Remote IPv6)
203 // in other words (because remote IPv6 = NAT64 prefix | Remote IPv4):
204 // checksum(Local IPv4) = checksum(Local IPv6 | NAT64 prefix)
205 // Do this by adjusting the two bytes in the middle of the IID.
206
207 uint16_t middlebytes = (myaddr->s6_addr[11] << 8) + myaddr->s6_addr[12];
208
209 uint32_t c1 = ip_checksum_add(0, ipv4_local_subnet, sizeof(*ipv4_local_subnet));
210 uint32_t c2 = ip_checksum_add(0, plat_subnet, sizeof(*plat_subnet)) +
211 ip_checksum_add(0, myaddr, sizeof(*myaddr));
212
junyulaic4e591a2018-11-26 22:36:10 +0900213 uint16_t delta = ip_checksum_adjust(middlebytes, c1, c2);
Lorenzo Colitti98089522014-10-09 22:29:45 +0900214 myaddr->s6_addr[11] = delta >> 8;
215 myaddr->s6_addr[12] = delta & 0xff;
216}
217
Lorenzo Colitti798f9932014-10-31 21:54:33 +0900218// Factored out to a separate function for testability.
219int connect_is_ipv4_address_free(in_addr_t addr) {
Maciej Żenczykowski60bce372019-04-09 01:58:52 -0700220 int s = socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0);
Lorenzo Colitti798f9932014-10-31 21:54:33 +0900221 if (s == -1) {
222 return 0;
223 }
224
225 // Attempt to connect to the address. If the connection succeeds and getsockname returns the same
226 // the address then the address is already assigned to the system and we can't use it.
Maciej Żenczykowskia02523b2019-10-31 23:53:37 -0700227 struct sockaddr_in sin = { .sin_family = AF_INET, .sin_addr = { addr }, .sin_port = htons(53) };
junyulaic4e591a2018-11-26 22:36:10 +0900228 socklen_t len = sizeof(sin);
229 int inuse = connect(s, (struct sockaddr *)&sin, sizeof(sin)) == 0 &&
230 getsockname(s, (struct sockaddr *)&sin, &len) == 0 && (size_t)len >= sizeof(sin) &&
Lorenzo Colitti798f9932014-10-31 21:54:33 +0900231 sin.sin_addr.s_addr == addr;
232
233 close(s);
234 return !inuse;
235}
236
237addr_free_func config_is_ipv4_address_free = connect_is_ipv4_address_free;
238
239/* function: config_select_ipv4_address
240 * picks a free IPv4 address, starting from ip and trying all addresses in the prefix in order
junyulaic4e591a2018-11-26 22:36:10 +0900241 * ip - the IP address from the configuration file
242 * prefixlen - the length of the prefix from which addresses may be selected.
243 * returns: the IPv4 address, or INADDR_NONE if no addresses were available
Lorenzo Colitti798f9932014-10-31 21:54:33 +0900244 */
245in_addr_t config_select_ipv4_address(const struct in_addr *ip, int16_t prefixlen) {
246 in_addr_t chosen = INADDR_NONE;
247
248 // Don't accept prefixes that are too large because we scan addresses one by one.
249 if (prefixlen < 16 || prefixlen > 32) {
junyulaic4e591a2018-11-26 22:36:10 +0900250 return chosen;
Lorenzo Colitti798f9932014-10-31 21:54:33 +0900251 }
252
253 // All these are in host byte order.
junyulaic4e591a2018-11-26 22:36:10 +0900254 in_addr_t mask = 0xffffffff >> (32 - prefixlen) << (32 - prefixlen);
255 in_addr_t ipv4 = ntohl(ip->s_addr);
Lorenzo Colitti798f9932014-10-31 21:54:33 +0900256 in_addr_t first_ipv4 = ipv4;
junyulaic4e591a2018-11-26 22:36:10 +0900257 in_addr_t prefix = ipv4 & mask;
Lorenzo Colitti798f9932014-10-31 21:54:33 +0900258
259 // Pick the first IPv4 address in the pool, wrapping around if necessary.
260 // So, for example, 192.0.0.4 -> 192.0.0.5 -> 192.0.0.6 -> 192.0.0.7 -> 192.0.0.0.
261 do {
junyulaic4e591a2018-11-26 22:36:10 +0900262 if (config_is_ipv4_address_free(htonl(ipv4))) {
263 chosen = htonl(ipv4);
264 break;
265 }
266 ipv4 = prefix | ((ipv4 + 1) & ~mask);
Lorenzo Colitti798f9932014-10-31 21:54:33 +0900267 } while (ipv4 != first_ipv4);
268
269 return chosen;
270}
271
Daniel Drowna45056e2012-03-23 10:42:54 -0500272/* function: config_generate_local_ipv6_subnet
junyulaic4e591a2018-11-26 22:36:10 +0900273 * generates the local ipv6 subnet when given the interface ip requires config.ipv6_host_id
274 * interface_ip - in: interface ip, out: local ipv6 host address
Daniel Drowna45056e2012-03-23 10:42:54 -0500275 */
276void config_generate_local_ipv6_subnet(struct in6_addr *interface_ip) {
277 int i;
278
Lorenzo Colitti2596f422014-11-10 17:00:02 -0800279 if (Global_Clatd_Config.use_dynamic_iid) {
Lorenzo Colitti98089522014-10-09 22:29:45 +0900280 /* Generate a random interface ID. */
junyulaic4e591a2018-11-26 22:36:10 +0900281 gen_random_iid(interface_ip, &Global_Clatd_Config.ipv4_local_subnet,
Lorenzo Colitti98089522014-10-09 22:29:45 +0900282 &Global_Clatd_Config.plat_subnet);
283 } else {
284 /* Use the specified interface ID. */
junyulaic4e591a2018-11-26 22:36:10 +0900285 for (i = 2; i < 4; i++) {
Lorenzo Colitti98089522014-10-09 22:29:45 +0900286 interface_ip->s6_addr32[i] = Global_Clatd_Config.ipv6_host_id.s6_addr32[i];
287 }
Daniel Drowna45056e2012-03-23 10:42:54 -0500288 }
289}
290
Daniel Drowna45056e2012-03-23 10:42:54 -0500291/* function: read_config
junyulaic4e591a2018-11-26 22:36:10 +0900292 * reads the config file and parses it into the global variable Global_Clatd_Config. returns 0 on
293 * failure, 1 on success
294 * file - filename to parse
295 * uplink_interface - interface to use to reach the internet and supplier of address space
296 * plat_prefix - (optional) plat prefix to use, otherwise follow config file
297 * net_id - (optional) netId to use, NETID_UNSET indicates use of default network
Daniel Drowna45056e2012-03-23 10:42:54 -0500298 */
Paul Jensena1c871c2014-05-30 13:19:10 -0400299int read_config(const char *file, const char *uplink_interface, const char *plat_prefix,
junyulaic4e591a2018-11-26 22:36:10 +0900300 unsigned net_id) {
301 cnode *root = config_node("", "");
Daniel Drowna45056e2012-03-23 10:42:54 -0500302 void *tmp_ptr = NULL;
Lorenzo Colitti2596f422014-11-10 17:00:02 -0800303 unsigned flags;
Daniel Drowna45056e2012-03-23 10:42:54 -0500304
junyulaic4e591a2018-11-26 22:36:10 +0900305 if (!root) {
306 logmsg(ANDROID_LOG_FATAL, "out of memory");
Daniel Drowna45056e2012-03-23 10:42:54 -0500307 return 0;
308 }
309
310 memset(&Global_Clatd_Config, '\0', sizeof(Global_Clatd_Config));
311
312 config_load_file(root, file);
junyulaic4e591a2018-11-26 22:36:10 +0900313 if (root->first_child == NULL) {
314 logmsg(ANDROID_LOG_FATAL, "Could not read config file %s", file);
Daniel Drowna45056e2012-03-23 10:42:54 -0500315 goto failed;
316 }
317
Lorenzo Colitti1352a3a2014-10-21 13:41:21 +0900318 Global_Clatd_Config.default_pdp_interface = strdup(uplink_interface);
junyulaic4e591a2018-11-26 22:36:10 +0900319 if (!Global_Clatd_Config.default_pdp_interface) goto failed;
320
junyulaic4e591a2018-11-26 22:36:10 +0900321 if (!config_item_ip(root, "ipv4_local_subnet", DEFAULT_IPV4_LOCAL_SUBNET,
322 &Global_Clatd_Config.ipv4_local_subnet))
Lorenzo Colitti1352a3a2014-10-21 13:41:21 +0900323 goto failed;
Daniel Drowna45056e2012-03-23 10:42:54 -0500324
junyulaic4e591a2018-11-26 22:36:10 +0900325 if (!config_item_int16_t(root, "ipv4_local_prefixlen", DEFAULT_IPV4_LOCAL_PREFIXLEN,
326 &Global_Clatd_Config.ipv4_local_prefixlen))
Daniel Drowna45056e2012-03-23 10:42:54 -0500327 goto failed;
328
junyulaic4e591a2018-11-26 22:36:10 +0900329 if (plat_prefix) { // plat subnet is coming from the command line
330 if (inet_pton(AF_INET6, plat_prefix, &Global_Clatd_Config.plat_subnet) <= 0) {
331 logmsg(ANDROID_LOG_FATAL, "invalid IPv6 address specified for plat prefix: %s", plat_prefix);
Daniel Drowna45056e2012-03-23 10:42:54 -0500332 goto failed;
333 }
334 } else {
335 tmp_ptr = (void *)config_item_str(root, "plat_from_dns64", "yes");
junyulaic4e591a2018-11-26 22:36:10 +0900336 if (!tmp_ptr || strcmp(tmp_ptr, "no") == 0) {
Daniel Drowna45056e2012-03-23 10:42:54 -0500337 free(tmp_ptr);
338
junyulaic4e591a2018-11-26 22:36:10 +0900339 if (!config_item_ip6(root, "plat_subnet", NULL, &Global_Clatd_Config.plat_subnet)) {
Daniel Drowna45056e2012-03-23 10:42:54 -0500340 logmsg(ANDROID_LOG_FATAL, "plat_from_dns64 disabled, but no plat_subnet specified");
341 goto failed;
342 }
343 } else {
344 free(tmp_ptr);
345
Paul Jensena1c871c2014-05-30 13:19:10 -0400346 dns64_detection(net_id);
Daniel Drowna45056e2012-03-23 10:42:54 -0500347 }
348 }
349
junyulaic4e591a2018-11-26 22:36:10 +0900350 if (!config_item_ip6(root, "ipv6_host_id", "::", &Global_Clatd_Config.ipv6_host_id)) goto failed;
Lorenzo Colitti98089522014-10-09 22:29:45 +0900351
Lorenzo Colitti2596f422014-11-10 17:00:02 -0800352 /* In order to prevent multiple devices attempting to use the same clat address, never use a
353 statically-configured interface ID on a broadcast interface such as wifi. */
354 if (!IN6_IS_ADDR_UNSPECIFIED(&Global_Clatd_Config.ipv6_host_id)) {
355 ifc_init();
356 ifc_get_info(Global_Clatd_Config.default_pdp_interface, NULL, NULL, &flags);
357 ifc_close();
358 Global_Clatd_Config.use_dynamic_iid = (flags & IFF_BROADCAST) != 0;
359 } else {
360 Global_Clatd_Config.use_dynamic_iid = 1;
361 }
362
Daniel Drowna45056e2012-03-23 10:42:54 -0500363 return 1;
364
365failed:
366 free(root);
Daniel Drowna45056e2012-03-23 10:42:54 -0500367 return 0;
368}
369
370/* function; dump_config
371 * prints the current config
372 */
373void dump_config() {
374 char charbuffer[INET6_ADDRSTRLEN];
375
junyulaic4e591a2018-11-26 22:36:10 +0900376 logmsg(
377 ANDROID_LOG_DEBUG, "ipv6_local_subnet = %s",
378 inet_ntop(AF_INET6, &Global_Clatd_Config.ipv6_local_subnet, charbuffer, sizeof(charbuffer)));
379 logmsg(
380 ANDROID_LOG_DEBUG, "ipv4_local_subnet = %s",
381 inet_ntop(AF_INET, &Global_Clatd_Config.ipv4_local_subnet, charbuffer, sizeof(charbuffer)));
382 logmsg(ANDROID_LOG_DEBUG, "ipv4_local_prefixlen = %d", Global_Clatd_Config.ipv4_local_prefixlen);
383 logmsg(ANDROID_LOG_DEBUG, "plat_subnet = %s",
384 inet_ntop(AF_INET6, &Global_Clatd_Config.plat_subnet, charbuffer, sizeof(charbuffer)));
385 logmsg(ANDROID_LOG_DEBUG, "default_pdp_interface = %s",
386 Global_Clatd_Config.default_pdp_interface);
Daniel Drowna45056e2012-03-23 10:42:54 -0500387}