Author: grothoff Date: 2008-03-02 00:21:20 -0700 (Sun, 02 Mar 2008) New Revision: 6502
Modified: GNUnet/src/transports/tcp.c Log: alternate Modified: GNUnet/src/transports/tcp.c =================================================================== --- GNUnet/src/transports/tcp.c 2008-03-02 06:10:07 UTC (rev 6501) +++ GNUnet/src/transports/tcp.c 2008-03-02 07:21:20 UTC (rev 6502) @@ -573,7 +573,13 @@ } haddr = (const HostAddress *) &hello[1]; available = ntohs (haddr->availability) & available_protocols; - + if (available == (VERSION_AVAILABLE_IPV4 | VERSION_AVAILABLE_IPV6)) + { + if (GNUNET_random_u32(GNUNET_RANDOM_QUALITY_WEAK, 2) == 0) + available = VERSION_AVAILABLE_IPV4; + else + available = VERSION_AVAILABLE_IPV6; + } if ((available & VERSION_AVAILABLE_IPV4) > 0) sock = SOCKET (PF_INET, SOCK_STREAM, 0); else if ((available & VERSION_AVAILABLE_IPV6) > 0) _______________________________________________ GNUnet-SVN mailing list GNUnet-SVN@gnu.org http://lists.gnu.org/mailman/listinfo/gnunet-svn