Hi, On Fri, 2013-02-15 at 12:19 +0200, Jukka Rissanen wrote: > + family = connman_inet_check_ipaddress(network); > + if (family < 0) { > + DBG("Cannot get address family of %s (%d/%s)", > network, > + family, gai_strerror(family)); > + if (strstr(network, ":") != NULL) { > + DBG("Guessing it is IPv6"); > + family = AF_INET6; > + } else { > + DBG("Guessing it is IPv4"); > + family = AF_INET; > + } > + }
Here we should fail if connman_inet_check_ipaddress() returns something else than AF_INET6 or AF_INET. The function returns < 0 if it's not a numeric address. Cheers, Patrik _______________________________________________ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman