sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_EVENT sockopt
authorXin Long <lucien.xin@gmail.com>
Mon, 28 Jan 2019 07:08:45 +0000 (15:08 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 30 Jan 2019 08:44:08 +0000 (00:44 -0800)
commitd251f05e3ba2e6ab7f59c88b497facf2f61c5b2f
treeceba1db48b3a45afbb75df646572eabdb3e716b5
parent99a62135e127977c06f4c44b6b9f24492a4b2153
sctp: use SCTP_FUTURE_ASSOC and add SCTP_CURRENT_ASSOC for SCTP_EVENT sockopt

Check with SCTP_ALL_ASSOC instead in sctp_setsockopt_event and
check with SCTP_FUTURE_ASSOC instead in sctp_getsockopt_event,
it's compatible with 0.

SCTP_CURRENT_ASSOC is supported for SCTP_EVENT in this patch.

It also adds sctp_assoc_ulpevent_type_set() to make code more
readable.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/socket.c