Commit 4abf5a65 authored by Xin Long's avatar Xin Long Committed by David S. Miller

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: default avatarXin Long <lucien.xin@gmail.com>
Acked-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c0a4c2d1
...@@ -1181,12 +1181,8 @@ void sctp_assoc_update(struct sctp_association *asoc, ...@@ -1181,12 +1181,8 @@ void sctp_assoc_update(struct sctp_association *asoc,
if (sctp_state(asoc, COOKIE_WAIT)) if (sctp_state(asoc, COOKIE_WAIT))
sctp_stream_update(&asoc->stream, &new->stream); sctp_stream_update(&asoc->stream, &new->stream);
if (!asoc->assoc_id) { /* get a new assoc id if we don't have one yet. */
/* get a new association id since we don't have one sctp_assoc_set_id(asoc, GFP_ATOMIC);
* yet.
*/
sctp_assoc_set_id(asoc, GFP_ATOMIC);
}
} }
/* SCTP-AUTH: Save the peer parameters from the new associations /* SCTP-AUTH: Save the peer parameters from the new associations
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment