GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
- by the Free Software Foundation; either version 2, or (at your
+ by the Free Software Foundation; either version 3, or (at your
option) any later version.
GNUnet is distributed in the hope that it will be useful, but
/**
* IPv4 address, in network byte order.
*/
- uint32_t ipv4_addr;
+ uint32_t ipv4_addr GNUNET_PACKED;
/**
* Port number, in network byte order.
*/
- uint16_t u_port;
+ uint16_t u_port GNUNET_PACKED;
};
/**
* IPv6 address.
*/
- struct in6_addr ipv6_addr;
+ struct in6_addr ipv6_addr GNUNET_PACKED;
/**
* Port number, in network byte order.
*/
- uint16_t u6_port;
+ uint16_t u6_port GNUNET_PACKED;
};
/* Forward definition */
{
serverAddrv4.sin_port = htons (GNUNET_CRYPTO_random_u32(GNUNET_CRYPTO_QUALITY_STRONG, 33537) + 32000); /* Find a good, non-root port */
#if DEBUG_UDP
- GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG,
- "udp",
- "Binding failed, trying new port %d\n", ntohs(serverAddrv4.sin_port));
+ GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG,
+ "udp",
+ "Binding failed, trying new port %d\n",
+ ntohs(serverAddrv4.sin_port));
#endif
}
udp_sock.port = ntohs(serverAddrv4.sin_port);
if ( (plugin->behind_nat == GNUNET_YES) && (in_port == 0) )
return GNUNET_OK;
if ( (plugin->only_nat_addresses == GNUNET_YES) &&
- (plugin->behind_nat == GNUNET_YES) &&
- (in_port != 0) )
+ (plugin->behind_nat == GNUNET_YES) )
return GNUNET_SYSERR; /* odd case... */
if (in_port == plugin->port)
return GNUNET_OK;