Skip to content

Commit 8c7c19a

Browse files
lxindavem330
authored andcommitted
sctp: do not mark sk dumped when inet_sctp_diag_fill returns err
sctp_diag would not actually dump out sk/asoc if inet_sctp_diag_fill returns err, in which case it shouldn't mark sk dumped by setting cb->args[3] as 1 in sctp_sock_dump(). Otherwise, it could cause some asocs to have no parent's sk dumped in 'ss --sctp'. So this patch is to not set cb->args[3] when inet_sctp_diag_fill() returns err in sctp_sock_dump(). Fixes: 8f840e4 ("sctp: add the sctp_diag.c file") Signed-off-by: Xin Long <[email protected]> Acked-by: Marcelo Ricardo Leitner <[email protected]> Acked-by: Neil Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d25adbe commit 8c7c19a

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

net/sctp/sctp_diag.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,6 @@ static int sctp_sock_dump(struct sctp_transport *tsp, void *p)
309309
cb->nlh->nlmsg_seq,
310310
NLM_F_MULTI, cb->nlh,
311311
commp->net_admin) < 0) {
312-
cb->args[3] = 1;
313312
err = 1;
314313
goto release;
315314
}

0 commit comments

Comments
 (0)