On Sun, Oct 24, 1999 at 07:41:03AM +0600, CyberPsychotic wrote:

>       SOCKHASH_LOCK();
>       if (snum == 0) {
> -             int rover = tcp_port_rover;
>               int low = sysctl_local_port_range[0];
>               int high = sysctl_local_port_range[1];
>               int remaining = (high - low) + 1;
> +             int rover = tcp_port_rover+jiffies%(high-low);
>  
>               do {    rover++;
>                       if ((rover < low) || (rover > high))

I'm not qualified to comment whether or not randomizing the port numbers
would be a good idea.

However, if you're going to do it, wouldn't it be better to use /dev/random
instead of anything based on the clock?  Bad randomness isn't much better
than no randomness.

Have fun,

Avery
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to