diff options
author | Xin Long <lucien.xin@gmail.com> | 2019-03-18 20:06:01 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-03-18 18:31:08 -0700 |
commit | a842e65b25a418363bf8196e2343123a984ee69b (patch) | |
tree | 4f7820b31605c4450eeee0bd1dec2012f20cd5c9 /net/sctp | |
parent | 8e2614fc1c2a525d3244df65da486fc914a2bf78 (diff) | |
download | lwn-a842e65b25a418363bf8196e2343123a984ee69b.tar.gz lwn-a842e65b25a418363bf8196e2343123a984ee69b.zip |
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: 92fc3bd928c9 ("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>
Diffstat (limited to 'net/sctp')
-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 4c5821befaf3..3bac03931b67 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -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; |