- if (strlen(local_addr) > 8) {
-#ifdef CONFIG_FEATURE_IPV6
- /* Demangle what the kernel gives us */
- sscanf(local_addr, "%08X%08X%08X%08X",
- &in6.s6_addr32[0], &in6.s6_addr32[1],
- &in6.s6_addr32[2], &in6.s6_addr32[3]);
- inet_ntop(AF_INET6, &in6, addr6, sizeof(addr6));
- inet_pton(AF_INET6, addr6, (struct sockaddr *) &localaddr.sin6_addr);
- sscanf(rem_addr, "%08X%08X%08X%08X",
- &in6.s6_addr32[0], &in6.s6_addr32[1],
- &in6.s6_addr32[2], &in6.s6_addr32[3]);
- inet_ntop(AF_INET6, &in6, addr6, sizeof(addr6));
- inet_pton(AF_INET6, addr6, (struct sockaddr *) &remaddr.sin6_addr);
- localaddr.sin6_family = AF_INET6;
- remaddr.sin6_family = AF_INET6;
-#endif
- } else {
- sscanf(local_addr, "%X",
- &((struct sockaddr_in *) &localaddr)->sin_addr.s_addr);
- sscanf(rem_addr, "%X",
- &((struct sockaddr_in *) &remaddr)->sin_addr.s_addr);
- ((struct sockaddr *) &localaddr)->sa_family = AF_INET;
- ((struct sockaddr *) &remaddr)->sa_family = AF_INET;
- }