Skip to content

Commit

Permalink
sctp: fix sack_timeout sysctl min and max types
Browse files Browse the repository at this point in the history
sctp_sack_timeout is defined as int, but the sysctl's maxsize is set
to sizeof(long) and the min/max are defined as long.

Signed-off-by: jean-mickael.guerin@6wind.com
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
  • Loading branch information
Jean-Mickael Guerin authored and Vlad Yasevich committed Jun 3, 2009
1 parent 10a43ce commit d48e074
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions net/sctp/sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ static int zero = 0;
static int one = 1;
static int timer_max = 86400000; /* ms in one day */
static int int_max = INT_MAX;
static long sack_timer_min = 1;
static long sack_timer_max = 500;
static int sack_timer_min = 1;
static int sack_timer_max = 500;

extern int sysctl_sctp_mem[3];
extern int sysctl_sctp_rmem[3];
Expand Down Expand Up @@ -223,7 +223,7 @@ static ctl_table sctp_table[] = {
.ctl_name = NET_SCTP_SACK_TIMEOUT,
.procname = "sack_timeout",
.data = &sctp_sack_timeout,
.maxlen = sizeof(long),
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dointvec_minmax,
.strategy = sysctl_intvec,
Expand Down

0 comments on commit d48e074

Please sign in to comment.