Skip to content

Commit 4abf5a6

Browse files
lxindavem330
authored andcommitted
sctp: no need to check assoc id before calling sctp_assoc_set_id
sctp_assoc_set_id does the assoc id check in the beginning when processing dupcookie, no need to do the same check before calling it. v1->v2: fix some typo errs Marcelo pointed in changelog. Signed-off-by: Xin Long <lucien.xin@gmail.com> Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent c0a4c2d commit 4abf5a6

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

net/sctp/associola.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,12 +1181,8 @@ void sctp_assoc_update(struct sctp_association *asoc,
11811181
if (sctp_state(asoc, COOKIE_WAIT))
11821182
sctp_stream_update(&asoc->stream, &new->stream);
11831183

1184-
if (!asoc->assoc_id) {
1185-
/* get a new association id since we don't have one
1186-
* yet.
1187-
*/
1188-
sctp_assoc_set_id(asoc, GFP_ATOMIC);
1189-
}
1184+
/* get a new assoc id if we don't have one yet. */
1185+
sctp_assoc_set_id(asoc, GFP_ATOMIC);
11901186
}
11911187

11921188
/* SCTP-AUTH: Save the peer parameters from the new associations

0 commit comments

Comments
 (0)