Skip to content

Commit

Permalink
sctp: fix ignoring asoc_id for tcp-style sockets on SCTP_EVENT sockopt
Browse files Browse the repository at this point in the history
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: d251f05 ("sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_EVENT sockopt")
Signed-off-by: Xin Long <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
lxin authored and davem330 committed Mar 19, 2019
1 parent 9430ff9 commit 9951861
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/sctp/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -4574,6 +4574,9 @@ static int sctp_setsockopt_event(struct sock *sk, char __user *optval,
if (asoc)
return sctp_assoc_ulpevent_type_set(&param, 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,
Expand Down

0 comments on commit 9951861

Please sign in to comment.