We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ed577e commit a122170Copy full SHA for a122170
net/sctp/diag.c
@@ -343,11 +343,9 @@ static int sctp_sock_filter(struct sctp_endpoint *ep, struct sctp_transport *tsp
343
struct sctp_comm_param *commp = p;
344
struct sock *sk = ep->base.sk;
345
const struct inet_diag_req_v2 *r = commp->r;
346
- struct sctp_association *assoc =
347
- list_entry(ep->asocs.next, struct sctp_association, asocs);
348
349
/* find the ep only once through the transports by this condition */
350
- if (tsp->asoc != assoc)
+ if (!list_is_first(&tsp->asoc->asocs, &ep->asocs))
351
return 0;
352
353
if (r->sdiag_family != AF_UNSPEC && sk->sk_family != r->sdiag_family)
0 commit comments