summaryrefslogtreecommitdiffstats
path: root/net/sctp/socket.c
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2019-03-18 13:06:00 +0100
committerDavid S. Miller <davem@davemloft.net>2019-03-19 02:31:08 +0100
commit8e2614fc1c2a525d3244df65da486fc914a2bf78 (patch)
tree658ad63276815eaab6b26c20d36f525474d9577f /net/sctp/socket.c
parentsctp: fix ignoring asoc_id for tcp-style sockets on SCTP_DEFAULT_SEND_PARAM s... (diff)
downloadlinux-8e2614fc1c2a525d3244df65da486fc914a2bf78.tar.xz
linux-8e2614fc1c2a525d3244df65da486fc914a2bf78.zip
sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_DELAYED_SACK sockopt
A similar fix as Patch "sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_DEFAULT_SEND_PARAM sockopt" on SCTP_DELAYED_SACK sockopt. Fixes: 9c5829e1c49e ("sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_DELAYED_SACK sockopt") Signed-off-by: Xin Long <lucien.xin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-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 d0e5c627a266..4c5821befaf3 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -2920,6 +2920,9 @@ static int sctp_setsockopt_delayed_ack(struct sock *sk,
return 0;
}
+ if (sctp_style(sk, TCP))
+ params.sack_assoc_id = SCTP_FUTURE_ASSOC;
+
if (params.sack_assoc_id == SCTP_FUTURE_ASSOC ||
params.sack_assoc_id == SCTP_ALL_ASSOC) {
if (params.sack_delay) {