This commit is contained in:
Roberto De Ioris
2014-10-16 20:53:47 +02:00
parent cc726c769f
commit ff36c8a779
+2
View File
@@ -565,6 +565,7 @@ char *generate_socket_name(char *socket_name) {
ifa = ifap;
while (ifa) {
memset(new_addr, 0, 16);
if (!ifa->ifa_addr) goto next;
sin = (struct sockaddr_in *) ifa->ifa_addr;
if (inet_ntop(AF_INET, (void *) &sin->sin_addr.s_addr, new_addr, 16)) {
if (!strncmp(socket_name, new_addr, strlen(socket_name))) {
@@ -577,6 +578,7 @@ char *generate_socket_name(char *socket_name) {
}
next:
ifaf = ifa;
ifa = ifaf->ifa_next;