diff options
author | Xin Long <lucien.xin@gmail.com> | 2019-03-18 20:06:11 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-03-18 18:31:09 -0700 |
commit | b59c19d9d901a8eb04896ec027787a55acb71fc6 (patch) | |
tree | 6956cf767bcc0f3b4993eaae5cd9b079d9f8d85a /net | |
parent | 995186193fd7a21c8fc6a2f2a96d33e26447eb01 (diff) | |
download | linux-b59c19d9d901a8eb04896ec027787a55acb71fc6.tar.bz2 |
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: 7efba10d6bd2 ("sctp: add SCTP_FUTURE_ASOC and SCTP_CURRENT_ASSOC for SCTP_STREAM_SCHEDULER sockopt")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/sctp/socket.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 10df48aa4e2c..011c349d877a 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -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; |