Message ID | a866141aba7511710929fffd71b0b911ddda28f4.1552910681.git.lucien.xin@gmail.com |
---|---|
State | Accepted |
Delegated to: | David Miller |
Headers | show |
Series | sctp: fix ignoring asoc_id for tcp-style sockets on some setsockopts | expand |
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 65b5386..d0e5c62 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -3024,6 +3024,9 @@ static int sctp_setsockopt_default_send_param(struct sock *sk, return 0; } + if (sctp_style(sk, TCP)) + info.sinfo_assoc_id = SCTP_FUTURE_ASSOC; + if (info.sinfo_assoc_id == SCTP_FUTURE_ASSOC || info.sinfo_assoc_id == SCTP_ALL_ASSOC) { sp->default_stream = info.sinfo_stream;