sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_MAX_BURST sockopt

A similar fix as Patch "sctp: fix ignoring asoc_id for tcp-style sockets on
SCTP_DEFAULT_SEND_PARAM sockopt" on SCTP_MAX_BURST sockopt.

Fixes: e0651a0dc8 ("sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_MAX_BURST sockopt")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Xin Long 2019-03-18 20:06:03 +08:00 committed by David S. Miller
parent cface2cb58
commit 746bc215a6
1 changed files with 3 additions and 0 deletions

View File

@ -3682,6 +3682,9 @@ static int sctp_setsockopt_maxburst(struct sock *sk,
return 0; return 0;
} }
if (sctp_style(sk, TCP))
params.assoc_id = SCTP_FUTURE_ASSOC;
if (params.assoc_id == SCTP_FUTURE_ASSOC || if (params.assoc_id == SCTP_FUTURE_ASSOC ||
params.assoc_id == SCTP_ALL_ASSOC) params.assoc_id == SCTP_ALL_ASSOC)
sp->max_burst = params.assoc_value; sp->max_burst = params.assoc_value;