net->netmask = (struct sockaddr *) &tmp[1];
net->length = addrlen;
+ memset (&network4, 0, sizeof (network4));
network4.sin_family = AF_INET;
- network4.sin_port = htons (0);
#if HAVE_SOCKADDR_IN_SIN_LEN
network4.sin_len = sizeof (network4);
#endif
net->netmask = (struct sockaddr *) &tmp[1];
net->length = addrlen;
+ memset (&network6, 0, sizeof (network6));
network6.sin6_family = AF_INET6;
- network6.sin6_port = htons (0);
#if HAVE_SOCKADDR_IN_SIN_LEN
network6.sin6_len = sizeof (network6);
#endif
/* Store in list */
if (net != NULL)
{
+#if VERBOSE_ATS
char * netmask = strdup (GNUNET_a2s((struct sockaddr *) net->netmask, addrlen));
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Adding network `%s', netmask `%s'\n",
GNUNET_a2s((struct sockaddr *) net->network, addrlen),
netmask);
GNUNET_free (netmask);
+# endif
GNUNET_CONTAINER_DLL_insert(sh->net_head, sh->net_tail, net);
}
return GNUNET_OK;
size_t namelen;
size_t msize;
+ if ((address == NULL) && (session == NULL))
+ {
+ GNUNET_break (0);
+ return;
+ }
+
namelen =
(address->transport_name ==
NULL) ? 0 : strlen (address->transport_name) + 1;