summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctputil.c
diff options
context:
space:
mode:
authorrrs <rrs@FreeBSD.org>2007-10-16 14:05:51 +0000
committerrrs <rrs@FreeBSD.org>2007-10-16 14:05:51 +0000
commitca7dd6ed00d7b8c0203672071f42019bf8f2e91c (patch)
tree169ea5af0b4fe0690954c3c0bf963a4a2d5dbf1d /sys/netinet/sctputil.c
parente348108e8d4da58dae544d842822f5ac998adda6 (diff)
downloadFreeBSD-src-ca7dd6ed00d7b8c0203672071f42019bf8f2e91c.zip
FreeBSD-src-ca7dd6ed00d7b8c0203672071f42019bf8f2e91c.tar.gz
- fix sctp_ifn initial refcount issue (prevents deletion)
- fix a bug during cookie collision that prevented an association from coming up in a specific restart case. - Fix it so the shutdown-pending flag gets removed (this is more for correctness then needed) when we enter shutdown-sent or shutdown-ack-sent states. - Fix a bug that caused the receiver to sometimes NOT send a SACK when a duplicate TSN arrived. Without this fix it was possible for the association to fall down if the - Deleted primary destination is also stored when SCTP_MOBILITY_BASE. (Previously, it is stored when only SCTP_MOBILITY_FASTHANDOFF) - Fix a locking issue where we might call send_initiate_ack() and incorrectly state the lock held/not held. Also fix it so that when we release the lock the inp cannot be deleted on us. - Add the debug option that can cause the stack to panic instead of aborting an assoc. This does not and should never show up in options but is useful for debugging unexpected aborts. - Add cumack_log sent to track sending cumack information for the debug case where we are running a special log per assoc. - Added extra () aroudn sctp_sbspace macro to avoid compile warnings. MFC after: 1 week
Diffstat (limited to 'sys/netinet/sctputil.c')
-rw-r--r--sys/netinet/sctputil.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c
index 76a7902..c1ffe81 100644
--- a/sys/netinet/sctputil.c
+++ b/sys/netinet/sctputil.c
@@ -934,6 +934,7 @@ sctp_init_asoc(struct sctp_inpcb *m, struct sctp_tcb *stcb,
asoc->tsn_in_wrapped = 0;
asoc->tsn_out_wrapped = 0;
asoc->cumack_log_at = 0;
+ asoc->cumack_log_atsnt = 0;
#endif
#ifdef SCTP_FS_SPEC_LOG
asoc->fs_index = 0;
@@ -3911,6 +3912,9 @@ sctp_abort_an_association(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
if ((inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) == 0)
sctp_abort_notification(stcb, error, so_locked);
/* notify the peer */
+#if defined(SCTP_PANIC_ON_ABORT)
+ panic("aborting an association");
+#endif
sctp_send_abort_tcb(stcb, op_err, so_locked);
SCTP_STAT_INCR_COUNTER32(sctps_aborted);
if ((SCTP_GET_STATE(&stcb->asoc) == SCTP_STATE_OPEN) ||
@@ -5575,11 +5579,11 @@ get_more_data:
if (TAILQ_NEXT(control, next) == NULL) {
/*
* If we don't have a next we need a
- * lock, if there is a next interrupt
- * is filling ahead of us and we
- * don't need a lock to remove this
- * guy (which is the head of the
- * queue).
+ * lock, if there is a next
+ * interrupt is filling ahead of us
+ * and we don't need a lock to
+ * remove this guy (which is the
+ * head of the queue).
*/
if (hold_rlock == 0) {
SCTP_INP_READ_LOCK(inp);
OpenPOWER on IntegriCloud