Fix PCPSendUnsolicitedAnnounce() when IPv6 is not available
IPV6 can be enabled at compile time but unavailable at runtime
see
@@ -1688,6 +1688,7 @@ void PCPSendUnsolicitedAnnounce(int * sockets, int n_sockets)
}
}
#ifdef ENABLE_IPV6
+ if (socket6 >= 0) {
memset(&addr6, 0, sizeof(struct sockaddr_in6));
addr6.sin6_family = AF_INET6;
inet_pton(AF_INET6, "FF02::1", &(addr6.sin6_addr));
@@ -1696,6 +1697,7 @@ void PCPSendUnsolicitedAnnounce(int * sockets, int n_sockets)
if( len < 0 ) {
syslog(LOG_ERR, "PCPSendUnsolicitedAnnounce() IPv6 sendto(): %m");
}
+ }
#endif /* ENABLE_IPV6 */
}
