sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_DEFAULT_SNDINFO sockopt
A similar fix as Patch "sctp: fix ignoring asoc_id for tcp-style sockets on
SCTP_DEFAULT_SEND_PARAM sockopt" on SCTP_DEFAULT_SNDINFO sockopt.
Fixes: 92fc3bd928
("sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_DEFAULT_SNDINFO sockopt")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Родитель
8e2614fc1c
Коммит
a842e65b25
|
@ -3087,6 +3087,9 @@ static int sctp_setsockopt_default_sndinfo(struct sock *sk,
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (sctp_style(sk, TCP))
|
||||
info.snd_assoc_id = SCTP_FUTURE_ASSOC;
|
||||
|
||||
if (info.snd_assoc_id == SCTP_FUTURE_ASSOC ||
|
||||
info.snd_assoc_id == SCTP_ALL_ASSOC) {
|
||||
sp->default_stream = info.snd_sid;
|
||||
|
|
Загрузка…
Ссылка в новой задаче