Retire the SCTP sysctl "strict_init". We always perform the validation
and there is no reason to make is configuarable. Discussed with rrs@.
This commit is contained in:
parent
d68fdc4df6
commit
ab6174d587
@ -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);
|
||||
|
@ -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;
|
||||
@ -607,7 +606,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);
|
||||
@ -876,10 +874,6 @@ SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, loopback_nocsum, CTLTYPE_UINT | CTLFL
|
||||
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);
|
||||
|
@ -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;
|
||||
@ -168,12 +167,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
|
||||
|
Loading…
x
Reference in New Issue
Block a user