sctp: implement sysctl to enable/disable STREAM-RESET
Subsystems (2)
PATCH 2/6 sctp: implement sysctl to enable/disable STREAM-RESET
This patch provides a way to enable/disable STREAM-RESET extension.
Signed-off-by Wei Yongjun <[email protected]>
--- include/net/sctp/structs.h | 4 ++++ net/sctp/protocol.c | 3 +++ net/sctp/sysctl.c | 9 +++++++++ 3 files changed, 16 insertions(+), 0 deletions(-)
include/net/sctp/structs.h +4 -0
@@ -222,6 +222,9 @@ extern struct sctp_globals {/* Flag to indicate whether computing and verifying checksum * is disabled. */ int checksum_disable; + +/* Flag to idicate if STREAM-RESET is enabled */ +int strrst_enable; } sctp_globals;#define sctp_rto_initial (sctp_globals.rto_initial)
@@ -257,6 +260,7 @@ extern struct sctp_globals {#define sctp_prsctp_enable (sctp_globals.prsctp_enable)#define sctp_auth_enable (sctp_globals.auth_enable)#define sctp_checksum_disable (sctp_globals.checksum_disable) +#define sctp_strrst_enable (sctp_globals.strrst_enable)/* SCTP Socket type: UDP or TCP style. */ typedef enum {
net/sctp/protocol.c +3 -0
@@ -1262,6 +1262,9 @@ SCTP_STATIC __init int sctp_init(void)/* Disable AUTH by default. */ sctp_auth_enable =0 ; +/* Disable STREAM-RESET by default. */ + sctp_strrst_enable =0 ; +sctp_sysctl_register ();INIT_LIST_HEAD (&sctp_address_families);
net/sctp/sysctl.c +9 -0
@@ -272,6 +272,15 @@ static ctl_table sctp_table[] = { .proc_handler = proc_dointvec, .strategy = sysctl_intvec }, + { + .ctl_name = CTL_UNNUMBERED, + .procname = "strrst_enable", + .data = &sctp_strrst_enable, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = proc_dointvec, + .strategy = sysctl_intvec + }, { .ctl_name = 0 } };
Signature · 1 line
1.5.3.8