summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctp_indata.c
diff options
context:
space:
mode:
authorrrs <rrs@FreeBSD.org>2006-11-11 15:59:01 +0000
committerrrs <rrs@FreeBSD.org>2006-11-11 15:59:01 +0000
commite0c50feae8264926c5241ae08542f1f75ef7cc65 (patch)
treead54f2c4385045522d51df03b3f6502d25221456 /sys/netinet/sctp_indata.c
parent0100d343f488d0d5c2e70c793182caa2fe89fcc0 (diff)
downloadFreeBSD-src-e0c50feae8264926c5241ae08542f1f75ef7cc65.zip
FreeBSD-src-e0c50feae8264926c5241ae08542f1f75ef7cc65.tar.gz
Turns out we would reset the TSN seq counter during
a colliding INIT. This if fine except when we have data outstanding... we basically reset it to the previous value it was.. so then we end up assigning the same TSN to two different data chunks. This patch: 1) Finds a missing lock for when we change the stream numbers during COOKIE and INIT-ACK processing.. we were NOT locking the send_buffer.. which COULD cause problems (found by inspection looking for <2>) 2) Fixes a case during a colliding INIT where we incorrectly reset the sending Sequence thus in some cases duplicately assigning a TSN. 3) Additional enhancments to logging so we can see strm/tsn in the receiver AND new tracking to watch what the sender is doing with TSN and STRM seq's. Approved by: gnn
Diffstat (limited to 'sys/netinet/sctp_indata.c')
-rw-r--r--sys/netinet/sctp_indata.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/sctp_indata.c b/sys/netinet/sctp_indata.c
index 2da8f8b..7b65964 100644
--- a/sys/netinet/sctp_indata.c
+++ b/sys/netinet/sctp_indata.c
@@ -1760,7 +1760,7 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struct sctp_association *asoc,
}
SCTP_STAT_INCR(sctps_recvexpress);
#ifdef SCTP_STR_LOGGING
- sctp_log_strm_del_alt(tsn, strmseq,
+ sctp_log_strm_del_alt(stcb, tsn, strmseq, strmno,
SCTP_STR_LOG_FROM_EXPRS_DEL);
#endif
control = NULL;
@@ -2088,7 +2088,7 @@ finish_express_del:
SCTP_STAT_INCR(sctps_recvdata);
/* Set it present please */
#ifdef SCTP_STR_LOGGING
- sctp_log_strm_del_alt(tsn, strmseq, SCTP_STR_LOG_FROM_MARK_TSN);
+ sctp_log_strm_del_alt(stcb, tsn, strmseq, strmno, SCTP_STR_LOG_FROM_MARK_TSN);
#endif
#ifdef SCTP_MAP_LOGGING
sctp_log_map(asoc->mapping_array_base_tsn, asoc->cumulative_tsn,
OpenPOWER on IntegriCloud