diff options
author | Zhu Yanjun <zyjzyj2000@gmail.com> | 2015-12-16 00:55:04 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-12-16 10:56:50 -0500 |
commit | 566178f853c1aa57be9c16007c7cca07df5d51b6 (patch) | |
tree | 06be833c93f5428271951e61c30b63acbef46a3d /net/sctp/protocol.c | |
parent | 6857a02af5386e9f5d11734363741dbe6b0a6959 (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/protocol.c')
-rw-r--r-- | net/sctp/protocol.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index 6c2c0accc6a0..010aced44b6b 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
@@ -1223,6 +1223,9 @@ static int __net_init sctp_defaults_init(struct net *net) | |||
1223 | /* Max.Burst - 4 */ | 1223 | /* Max.Burst - 4 */ |
1224 | net->sctp.max_burst = SCTP_DEFAULT_MAX_BURST; | 1224 | net->sctp.max_burst = SCTP_DEFAULT_MAX_BURST; |
1225 | 1225 | ||
1226 | /* Enable pf state by default */ | ||
1227 | net->sctp.pf_enable = 1; | ||
1228 | |||
1226 | /* Association.Max.Retrans - 10 attempts | 1229 | /* Association.Max.Retrans - 10 attempts |
1227 | * Path.Max.Retrans - 5 attempts (per destination address) | 1230 | * Path.Max.Retrans - 5 attempts (per destination address) |
1228 | * Max.Init.Retransmits - 8 attempts | 1231 | * Max.Init.Retransmits - 8 attempts |