Skip to content

Commit

Permalink
net: sctp: only warn in proc_sctp_do_alpha_beta if write
Browse files Browse the repository at this point in the history
Only warn if the value is written to alpha or beta. We don't care
emitting a one-time warning when only reading it.

Reported-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Reviewed-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Daniel Borkmann authored and David S. Miller committed Jul 3, 2014
1 parent 8f61059 commit eaea2da
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions net/sctp/sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,9 @@ static int proc_sctp_do_alpha_beta(struct ctl_table *ctl, int write,
void __user *buffer, size_t *lenp,
loff_t *ppos)
{
pr_warn_once("Changing rto_alpha or rto_beta may lead to "
"suboptimal rtt/srtt estimations!\n");
if (write)
pr_warn_once("Changing rto_alpha or rto_beta may lead to "
"suboptimal rtt/srtt estimations!\n");

return proc_dointvec_minmax(ctl, write, buffer, lenp, ppos);
}
Expand Down

0 comments on commit eaea2da

Please sign in to comment.