Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 99518619 authored by Xin Long's avatar Xin Long Committed by David S. Miller
Browse files

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: d251f05e ("sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_EVENT sockopt")
Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9430ff99
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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,