svn commit: r323372 - head/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Sat Sep 9 19:49:51 UTC 2017
Author: tuexen
Date: Sat Sep 9 19:49:50 2017
New Revision: 323372
URL: https://svnweb.freebsd.org/changeset/base/323372
Log:
Savely remove a chunk from the control queue.
This bug was found by Coverity scanning the usrsctp library.
MFC after: 3 days
Modified:
head/sys/netinet/sctp_input.c
Modified: head/sys/netinet/sctp_input.c
==============================================================================
--- head/sys/netinet/sctp_input.c Sat Sep 9 19:19:13 2017 (r323371)
+++ head/sys/netinet/sctp_input.c Sat Sep 9 19:49:50 2017 (r323372)
@@ -3133,14 +3133,14 @@ sctp_handle_ecn_cwr(struct sctp_cwr_chunk *cp, struct
* make sure that we have a covered ECNE in the control chunk part.
* If so remove it.
*/
- struct sctp_tmit_chunk *chk;
+ struct sctp_tmit_chunk *chk, *nchk;
struct sctp_ecne_chunk *ecne;
int override;
uint32_t cwr_tsn;
cwr_tsn = ntohl(cp->tsn);
override = cp->ch.chunk_flags & SCTP_CWR_REDUCE_OVERRIDE;
- TAILQ_FOREACH(chk, &stcb->asoc.control_send_queue, sctp_next) {
+ TAILQ_FOREACH_SAFE(chk, &stcb->asoc.control_send_queue, sctp_next, nchk) {
if (chk->rec.chunk_id.id != SCTP_ECN_ECHO) {
continue;
}
More information about the svn-src-all
mailing list