Re: [PATCH v1 1/2] TCPCT API sysctl update to draft -03

From: Eric Dumazet
Date: Wed Jan 12 2011 - 13:05:35 EST


Le mercredi 12 janvier 2011 Ã 12:52 -0500, William Allen Simpson a
Ãcrit :
> Use most recently specified symbols of RFC-to-be-6013.
>
> Allows different global s_data limits for SYN and SYN_ACK.
>
> CC: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx>
> CC: Stephen Hemminger <shemminger@xxxxxxxxxx>
> CC: Andi Kleen <andi@xxxxxxxxxxxxxx>


> Signed-off-by: William.Allen.Simpson@xxxxxxxxx

Should be :

Signed-off-by: William Allen Simpson <William.Allen.Simpson@xxxxxxxxx>

> ---
> Documentation/networking/ip-sysctl.txt | 10 ++++++++++
> include/net/tcp.h | 2 ++
> net/ipv4/sysctl_net_ipv4.c | 25 ++++++++++++++++++++++++-
> net/ipv4/tcp_output.c | 19 +++++++++++++++++--
> 4 files changed, 53 insertions(+), 3 deletions(-)

Hmm, patch is not inlined, so I have to copy/paste

+static int tcp_cookie_max = TCP_COOKIE_MAX;

...

/* Update system visible IP port range */
static void set_local_port_range(int range[2])
@@ -588,7 +591,27 @@ static struct ctl_table ipv4_table[] = {
.data = &sysctl_tcp_cookie_size,
.maxlen = sizeof(int),
.mode = 0644,
- .proc_handler = proc_dointvec
+ .proc_handler = proc_dointvec_minmax,
+ .extra1 = &zero,
+ .extra2 = &tcp_cookie_max,
+ },


Now sysctl_tcp_cookie_size has a max limit of TCP_COOKIE_MAX, you can
remove the now uneeded check in :

static u8 tcp_cookie_size_check(u8 desired)
...
if (cookie_size >= TCP_COOKIE_MAX)
/* value too large, specify maximum */
return TCP_COOKIE_MAX;



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