summaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2023-02-17 12:06:39 +0100
committerDavid S. Miller <davem@davemloft.net>2023-02-17 12:06:39 +0100
commit675f176b4dcc2b75adbcea7ba0e9a649527f53bd (patch)
treedc5eea870c19b405bb6558964e5367bb6c9205c5 /net/sctp
parentMerge branch 'mlx5-next' of https://git.kernel.org/pub/scm/linux/kernel/git/m... (diff)
parentMerge tag 'drm-fixes-2023-02-17' of git://anongit.freedesktop.org/drm/drm (diff)
downloadlinux-675f176b4dcc2b75adbcea7ba0e9a649527f53bd.tar.xz
linux-675f176b4dcc2b75adbcea7ba0e9a649527f53bd.zip
Merge ra.kernel.org:/pub/scm/linux/kernel/git/netdev/net
Some of the devlink bits were tricky, but I think I got it right. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/diag.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/sctp/diag.c b/net/sctp/diag.c
index a557009e9832..c3d6b92dd386 100644
--- a/net/sctp/diag.c
+++ b/net/sctp/diag.c
@@ -343,11 +343,9 @@ static int sctp_sock_filter(struct sctp_endpoint *ep, struct sctp_transport *tsp
struct sctp_comm_param *commp = p;
struct sock *sk = ep->base.sk;
const struct inet_diag_req_v2 *r = commp->r;
- struct sctp_association *assoc =
- list_entry(ep->asocs.next, struct sctp_association, asocs);
/* find the ep only once through the transports by this condition */
- if (tsp->asoc != assoc)
+ if (!list_is_first(&tsp->asoc->asocs, &ep->asocs))
return 0;
if (r->sdiag_family != AF_UNSPEC && sk->sk_family != r->sdiag_family)