diff options
author | Xin Long <lucien.xin@gmail.com> | 2019-03-18 13:06:10 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-03-19 02:31:09 +0100 |
commit | 995186193fd7a21c8fc6a2f2a96d33e26447eb01 (patch) | |
tree | 13279e5648aa3efe4ea81e5f369c73fa47062a8b /net/sctp | |
parent | sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_ENABLE_STREAM_RESET ... (diff) | |
download | linux-995186193fd7a21c8fc6a2f2a96d33e26447eb01.tar.xz linux-995186193fd7a21c8fc6a2f2a96d33e26447eb01.zip |
sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_EVENT sockopt
A similar fix as Patch "sctp: fix ignoring asoc_id for tcp-style sockets on
SCTP_DEFAULT_SEND_PARAM sockopt" on SCTP_EVENT sockopt.
Fixes: d251f05e3ba2 ("sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_EVENT 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 6b0ee8946bdb..10df48aa4e2c 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -4574,6 +4574,9 @@ static int sctp_setsockopt_event(struct sock *sk, char __user *optval, if (asoc) return sctp_assoc_ulpevent_type_set(¶m, asoc); + if (sctp_style(sk, TCP)) + param.se_assoc_id = SCTP_FUTURE_ASSOC; + if (param.se_assoc_id == SCTP_FUTURE_ASSOC || param.se_assoc_id == SCTP_ALL_ASSOC) sctp_ulpevent_type_set(&sp->subscribe, |