Re: Two questions

From: APW@uk.ibm.com
Date: Fri Jun 02 2000 - 07:03:28 EST


>
> (2) Alexy, you probably know this by heart. I thought that the port
number
> used in response to a TCP/IP connection request, was supposed to be a
> "random short int with a value above 1000".
> This is what I get:
>
> 204.178.40.224:32790 -> 204.178.40.137:23
> 204.178.40.224:32789 -> 204.178.40.137:23
> 204.178.40.224:32788 -> 204.178.40.137:23
> 204.178.40.224:32787 -> 204.178.40.137:23
>
> No, port numbers for outbound connections are normally allocated
> linearly. TCP sequence numbers are pseudo-random.
>

The key point here is that the you cannot rely on the value here. Most
kernels will allocate linearly avoiding in use ports, but you cannot know
that it will. The phrase is intended to indicate this possibility.

-apw

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Jun 07 2000 - 21:00:15 EST