Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Feb 2012 20:04:21 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r231043 - stable/9/sys/netinet
Message-ID:  <201202052004.q15K4Luo098980@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Sun Feb  5 20:04:21 2012
New Revision: 231043
URL: http://svn.freebsd.org/changeset/base/231043

Log:
  MFC 229775:
  Retire the SCTP sysctl "strict_init". We always perform the validation
  and there is no reason to make is configuarable.
  Discussed with rrs@.

Modified:
  stable/9/sys/netinet/sctp_input.c
  stable/9/sys/netinet/sctp_sysctl.c
  stable/9/sys/netinet/sctp_sysctl.h
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/netinet/sctp_input.c
==============================================================================
--- stable/9/sys/netinet/sctp_input.c	Sun Feb  5 20:00:39 2012	(r231042)
+++ stable/9/sys/netinet/sctp_input.c	Sun Feb  5 20:04:21 2012	(r231043)
@@ -4617,7 +4617,7 @@ process_control_chunks:
 			SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_INIT\n");
 			/* The INIT chunk must be the only chunk. */
 			if ((num_chunks > 1) ||
-			    (SCTP_BASE_SYSCTL(sctp_strict_init) && (length - *offset > (int)SCTP_SIZE32(chk_length)))) {
+			    (length - *offset > (int)SCTP_SIZE32(chk_length))) {
 				sctp_abort_association(inp, stcb, m,
 				    iphlen, sh, NULL, vrf_id, port);
 				*offset = length;
@@ -4673,9 +4673,9 @@ process_control_chunks:
 					return (NULL);
 				}
 			}
-			/* The INIT-CK chunk must be the only chunk. */
+			/* The INIT-ACK chunk must be the only chunk. */
 			if ((num_chunks > 1) ||
-			    (SCTP_BASE_SYSCTL(sctp_strict_init) && (length - *offset > (int)SCTP_SIZE32(chk_length)))) {
+			    (length - *offset > (int)SCTP_SIZE32(chk_length))) {
 				*offset = length;
 				if (locked_tcb) {
 					SCTP_TCB_UNLOCK(locked_tcb);

Modified: stable/9/sys/netinet/sctp_sysctl.c
==============================================================================
--- stable/9/sys/netinet/sctp_sysctl.c	Sun Feb  5 20:00:39 2012	(r231042)
+++ stable/9/sys/netinet/sctp_sysctl.c	Sun Feb  5 20:04:21 2012	(r231043)
@@ -58,7 +58,6 @@ sctp_init_sysctls()
 #if !defined(SCTP_WITH_NO_CSUM)
 	SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback) = SCTPCTL_LOOPBACK_NOCSUM_DEFAULT;
 #endif
-	SCTP_BASE_SYSCTL(sctp_strict_init) = SCTPCTL_STRICT_INIT_DEFAULT;
 	SCTP_BASE_SYSCTL(sctp_peer_chunk_oh) = SCTPCTL_PEER_CHKOH_DEFAULT;
 	SCTP_BASE_SYSCTL(sctp_max_burst_default) = SCTPCTL_MAXBURST_DEFAULT;
 	SCTP_BASE_SYSCTL(sctp_fr_max_burst_default) = SCTPCTL_FRMAXBURST_DEFAULT;
@@ -608,7 +607,6 @@ sysctl_sctp_check(SYSCTL_HANDLER_ARGS)
 #if !defined(SCTP_WITH_NO_CSUM)
 		RANGECHK(SCTP_BASE_SYSCTL(sctp_no_csum_on_loopback), SCTPCTL_LOOPBACK_NOCSUM_MIN, SCTPCTL_LOOPBACK_NOCSUM_MAX);
 #endif
-		RANGECHK(SCTP_BASE_SYSCTL(sctp_strict_init), SCTPCTL_STRICT_INIT_MIN, SCTPCTL_STRICT_INIT_MAX);
 		RANGECHK(SCTP_BASE_SYSCTL(sctp_peer_chunk_oh), SCTPCTL_PEER_CHKOH_MIN, SCTPCTL_PEER_CHKOH_MAX);
 		RANGECHK(SCTP_BASE_SYSCTL(sctp_max_burst_default), SCTPCTL_MAXBURST_MIN, SCTPCTL_MAXBURST_MAX);
 		RANGECHK(SCTP_BASE_SYSCTL(sctp_fr_max_burst_default), SCTPCTL_FRMAXBURST_MIN, SCTPCTL_FRMAXBURST_MAX);
@@ -881,10 +879,6 @@ SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUT
     SCTPCTL_LOOPBACK_NOCSUM_DESC);
 #endif
 
-SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, strict_init, CTLTYPE_UINT | CTLFLAG_RW,
-    &SCTP_BASE_SYSCTL(sctp_strict_init), 0, sysctl_sctp_check, "IU",
-    SCTPCTL_STRICT_INIT_DESC);
-
 SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, peer_chkoh, CTLTYPE_UINT | CTLFLAG_RW,
     &SCTP_BASE_SYSCTL(sctp_peer_chunk_oh), 0, sysctl_sctp_check, "IU",
     SCTPCTL_PEER_CHKOH_DESC);

Modified: stable/9/sys/netinet/sctp_sysctl.h
==============================================================================
--- stable/9/sys/netinet/sctp_sysctl.h	Sun Feb  5 20:00:39 2012	(r231042)
+++ stable/9/sys/netinet/sctp_sysctl.h	Sun Feb  5 20:04:21 2012	(r231043)
@@ -50,7 +50,6 @@ struct sctp_sysctl {
 #if !defined(SCTP_WITH_NO_CSUM)
 	uint32_t sctp_no_csum_on_loopback;
 #endif
-	uint32_t sctp_strict_init;
 	uint32_t sctp_peer_chunk_oh;
 	uint32_t sctp_max_burst_default;
 	uint32_t sctp_max_chunks_on_queue;
@@ -169,12 +168,6 @@ struct sctp_sysctl {
 #define SCTPCTL_LOOPBACK_NOCSUM_MAX	1
 #define SCTPCTL_LOOPBACK_NOCSUM_DEFAULT	1
 
-/* strict_init: Enable strict INIT/INIT-ACK singleton enforcement */
-#define SCTPCTL_STRICT_INIT_DESC	"Enable strict INIT/INIT-ACK singleton enforcement"
-#define SCTPCTL_STRICT_INIT_MIN		0
-#define SCTPCTL_STRICT_INIT_MAX		1
-#define SCTPCTL_STRICT_INIT_DEFAULT	1
-
 /* peer_chkoh: Amount to debit peers rwnd per chunk sent */
 #define SCTPCTL_PEER_CHKOH_DESC		"Amount to debit peers rwnd per chunk sent"
 #define SCTPCTL_PEER_CHKOH_MIN		0



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201202052004.q15K4Luo098980>