if (0 == (tc->reason & GNUNET_SCHEDULER_REASON_WRITE_READY))
{
- GNUNET_NETWORK_socket_close (sli->listeningSocket);
+ GNUNET_assert (GNUNET_OK == GNUNET_NETWORK_socket_close (sli->listeningSocket));
closeClientAndServiceSockets (fc, REASON_ERROR);
GNUNET_free (sli);
return;
if ( (strncmp (listen_address, "[::]:", 5) == 0) || (strncmp (listen_address, "::", 2) == 0) )
{
memset (&target_ipv6, 0, sizeof (target_ipv6));
- inet_pton (AF_INET6, "::1", &target_ipv6.sin6_addr);
+ target_ipv6.sin6_addr = in6addr_loopback;
target_ipv6.sin6_family = AF_INET6;
target_ipv6.sin6_port = v6->sin6_port;
v6 = &target_ipv6;
sock = GNUNET_NETWORK_socket_create (PF_INET6, SOCK_STREAM, 0);
break;
case AF_UNIX:
+ if (strcmp(GNUNET_a2s (sa, addr_len), "@") == 0) /* Do not bind to blank UNIX path! */
+ return;
sock = GNUNET_NETWORK_socket_create (PF_UNIX, SOCK_STREAM, 0);
break;
default:
if (GNUNET_NETWORK_socket_bind
(sock, (const struct sockaddr *) sa, addr_len) != GNUNET_OK)
{
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_("Unable to bind listening socket for service `%s' to address `%s': %s\n"),
serviceName,
GNUNET_a2s (sa, addr_len),