2002-11-12 18:21:22

by folkert

[permalink] [raw]
Subject: tcp_v4_get_port?

Hi,

Am I right that in net/ipv4/tcp_ipv4.c in function "tcp_v4_get_port" the
portnumber for a new connection is generated? Because fiddling with that
code seems to have no effect on the portnumbers generated for new
connections.


Folkert


2002-11-12 22:26:56

by Nivedita Singhvi

[permalink] [raw]
Subject: Re: tcp_v4_get_port?

> Am I right that in net/ipv4/tcp_ipv4.c in function "tcp_v4_get_port" the
> portnumber for a new connection is generated? Because fiddling with that
> code seems to have no effect on the portnumbers generated for new
> connections.

What change are you making and which kernel are you making it in?

thanks,
Nivedita

2002-11-13 16:54:07

by folkert

[permalink] [raw]
Subject: RE: tcp_v4_get_port?

> Am I right that in net/ipv4/tcp_ipv4.c in function "tcp_v4_get_port" the
> portnumber for a new connection is generated? Because fiddling with that
> code seems to have no effect on the portnumbers generated for new
> connections.
NS> What change are you making and which kernel are you making it in?

Kernel 2.4.19
Changes like; have it not starting to use ports from 1024 up, but
rather from 32768 down to 1024 (and then from 65535 down again).

2002-11-13 20:18:46

by Nivedita Singhvi

[permalink] [raw]
Subject: RE: tcp_v4_get_port?


> Kernel 2.4.19
> Changes like; have it not starting to use ports from 1024 up, but
> rather from 32768 down to 1024 (and then from 65535 down again).

In 2.4.19, see tcp_v4_hash_connect() also, if youre autobinding
on a connect().

thanks,
Nivedita