sctp: add subscribe per asoc
The member subscribe should be per asoc, so that sockopt SCTP_EVENT in the next patch can subscribe a event from one asoc only. Signed-off-by: Xin Long <lucien.xin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
2cc0eeb676
commit
a1e3a0590f
@@ -219,7 +219,7 @@ int sctp_ulpq_tail_event(struct sctp_ulpq *ulpq, struct sctp_ulpevent *event)
|
||||
sk_incoming_cpu_update(sk);
|
||||
}
|
||||
/* Check if the user wishes to receive this event. */
|
||||
if (!sctp_ulpevent_is_enabled(event, sp->subscribe))
|
||||
if (!sctp_ulpevent_is_enabled(event, ulpq->asoc->subscribe))
|
||||
goto out_free;
|
||||
|
||||
/* If we are in partial delivery mode, post to the lobby until
|
||||
@@ -1137,7 +1137,7 @@ void sctp_ulpq_abort_pd(struct sctp_ulpq *ulpq, gfp_t gfp)
|
||||
|
||||
sk = ulpq->asoc->base.sk;
|
||||
sp = sctp_sk(sk);
|
||||
if (sctp_ulpevent_type_enabled(sp->subscribe,
|
||||
if (sctp_ulpevent_type_enabled(ulpq->asoc->subscribe,
|
||||
SCTP_PARTIAL_DELIVERY_EVENT))
|
||||
ev = sctp_ulpevent_make_pdapi(ulpq->asoc,
|
||||
SCTP_PARTIAL_DELIVERY_ABORTED,
|
||||
|
Reference in New Issue
Block a user