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

Timothy Stack tstack at vmware.com
Tue Jul 13 11:44:22 EDT 2010


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


More information about the gPXE-devel mailing list