All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/6] sctp: implement sysctl to enable/disable STREAM-RESET
@ 2009-03-09  3:15 Wei Yongjun
  0 siblings, 0 replies; only message in thread
From: Wei Yongjun @ 2009-03-09  3:15 UTC (permalink / raw)
  To: linux-sctp

This patch provides a way to enable/disable STREAM-RESET extension.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
---
 include/net/sctp/structs.h |    4 ++++
 net/sctp/protocol.c        |    3 +++
 net/sctp/sysctl.c          |    9 +++++++++
 3 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 23f08fe..b92226b 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -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 {
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index cb198af..30a1410 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -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);
diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c
index f58e994..f176812 100644
--- a/net/sctp/sysctl.c
+++ b/net/sctp/sysctl.c
@@ -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 }
 };
 
-- 
1.5.3.8





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-03-09  3:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-09  3:15 [PATCH 2/6] sctp: implement sysctl to enable/disable STREAM-RESET Wei Yongjun

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.