[gPXE-devel] [PATCH 3/6] [tcp] Randomize TCP bind port

Guo-Fu Tseng cooldavid at cooldavid.org
Tue Jul 13 12:07:12 EDT 2010


On Tue, 13 Jul 2010 08:44:22 -0700, Timothy Stack wrote
> On Tue, Jul 13, 2010 at 08:15:41AM -0700, cooldavid at cooldavid.org wrote:
> > From: Guo-Fu Tseng <cooldavid at cooldavid.org>
> > +	try_port = ( currticks() % 64512 ) + 1023;
> 
> I think there is a random() function, can you use that instead of 
> currticks() ?
> 
> We've also found that randomizing the port number is a good thing.
> Firewalls seem to reject syn packets coming from the same host/port in 
> quick succession.
> 
> tim
Sure! Thank you tim and Piotr. :)

Guo-Fu Tseng



More information about the gPXE-devel mailing list