From: John Hodge Date: Sun, 9 Feb 2014 14:37:52 +0000 (+0800) Subject: Modules/IPStack - Increase range of TCP port allocation randomness X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=f0468fdd2e8f7585ad1f80ae08e5ed3bedacc28d;p=tpg%2Facess2.git Modules/IPStack - Increase range of TCP port allocation randomness --- diff --git a/KernelLand/Modules/IPStack/tcp.c b/KernelLand/Modules/IPStack/tcp.c index a94d7b54..4ef4bb36 100644 --- a/KernelLand/Modules/IPStack/tcp.c +++ b/KernelLand/Modules/IPStack/tcp.c @@ -8,7 +8,6 @@ #include "ipv6.h" #include "tcp.h" -#define USE_SELECT 1 #define HEXDUMP_INCOMING 0 #define HEXDUMP_OUTGOING 0 @@ -87,7 +86,7 @@ Uint32 gaTCP_PortBitmap[0x800]; */ void TCP_Initialise(void) { - giTCP_NextOutPort += rand()%32; + giTCP_NextOutPort += rand()%128; IPStack_AddFile(&gTCP_ServerFile); IPStack_AddFile(&gTCP_ClientFile); IPv4_RegisterCallback(IP4PROT_TCP, TCP_GetPacket);