summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2019-03-18 20:06:09 +0800
committerDavid S. Miller <davem@davemloft.net>2019-03-18 18:31:09 -0700
commit9430ff992644e9f9c3ba6283cc56d40b421522e9 (patch)
tree55842b23bbba833c0576256680d6f98f6eb60c90 /net
parentcbb45c6cd5e64c344798892d6e200b0b253d0b59 (diff)
downloadlinux-9430ff992644e9f9c3ba6283cc56d40b421522e9.tar.gz
linux-9430ff992644e9f9c3ba6283cc56d40b421522e9.tar.bz2
linux-9430ff992644e9f9c3ba6283cc56d40b421522e9.zip
sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_ENABLE_STREAM_RESET sockopt
A similar fix as Patch "sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_DEFAULT_SEND_PARAM sockopt" on SCTP_ENABLE_STREAM_RESET sockopt. Fixes: 99a62135e127 ("sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_ENABLE_STREAM_RESET 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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 238e5c804cc9..6b0ee8946bdb 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -4281,6 +4281,9 @@ static int sctp_setsockopt_enable_strreset(struct sock *sk,
goto out;
}
+ if (sctp_style(sk, TCP))
+ params.assoc_id = SCTP_FUTURE_ASSOC;
+
if (params.assoc_id == SCTP_FUTURE_ASSOC ||
params.assoc_id == SCTP_ALL_ASSOC)
ep->strreset_enable = params.assoc_value;