Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b59c19d9 authored by Xin Long's avatar Xin Long Committed by David S. Miller
Browse files

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



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

Fixes: 7efba10d ("sctp: add SCTP_FUTURE_ASOC and SCTP_CURRENT_ASSOC for SCTP_STREAM_SCHEDULER sockopt")
Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 99518619
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -4409,6 +4409,9 @@ static int sctp_setsockopt_scheduler(struct sock *sk,
	if (asoc)
		return sctp_sched_set_sched(asoc, params.assoc_value);

	if (sctp_style(sk, TCP))
		params.assoc_id = SCTP_FUTURE_ASSOC;

	if (params.assoc_id == SCTP_FUTURE_ASSOC ||
	    params.assoc_id == SCTP_ALL_ASSOC)
		sp->default_ss = params.assoc_value;