summaryrefslogtreecommitdiff
path: root/net/sctp/sysctl.c
diff options
context:
space:
mode:
authorZhu Yanjun <zyjzyj2000@gmail.com>2015-12-16 13:55:04 +0800
committerDavid S. Miller <davem@davemloft.net>2015-12-16 10:56:50 -0500
commit566178f853c1aa57be9c16007c7cca07df5d51b6 (patch)
tree06be833c93f5428271951e61c30b63acbef46a3d /net/sctp/sysctl.c
parent6857a02af5386e9f5d11734363741dbe6b0a6959 (diff)
net: sctp: dynamically enable or disable pf state
As we all know, the value of pf_retrans >= max_retrans_path can disable pf state. The variables of pf_retrans and max_retrans_path can be changed by the userspace application. Sometimes the user expects to disable pf state while the 2 variables are changed to enable pf state. So it is necessary to introduce a new variable to disable pf state. According to the suggestions from Vlad Yasevich, extra1 and extra2 are removed. The initialization of pf_enable is added. Acked-by: Vlad Yasevich <vyasevich@gmail.com> Signed-off-by: Zhu Yanjun <zyjzyj2000@gmail.com> Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/sysctl.c')
-rw-r--r--net/sctp/sysctl.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c
index 26d50c565f54..ccbfc93fb8fe 100644
--- a/net/sctp/sysctl.c
+++ b/net/sctp/sysctl.c
@@ -308,6 +308,13 @@ static struct ctl_table sctp_net_table[] = {
.extra1 = &max_autoclose_min,
.extra2 = &max_autoclose_max,
},
+ {
+ .procname = "pf_enable",
+ .data = &init_net.sctp.pf_enable,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+ .proc_handler = proc_dointvec,
+ },
{ /* sentinel */ }
};