summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/netinet/sctp_asconf.c2
-rw-r--r--sys/netinet/sctp_indata.c58
-rw-r--r--sys/netinet/sctputil.c6
3 files changed, 24 insertions, 42 deletions
diff --git a/sys/netinet/sctp_asconf.c b/sys/netinet/sctp_asconf.c
index f7de414..2d16ef0 100644
--- a/sys/netinet/sctp_asconf.c
+++ b/sys/netinet/sctp_asconf.c
@@ -1113,7 +1113,7 @@ sctp_assoc_immediate_retrans(struct sctp_tcb *stcb, struct sctp_nets *dstnet)
}
SCTP_TCB_LOCK_ASSERT(stcb);
#ifdef SCTP_AUDITING_ENABLED
- sctp_auditing(4, stcb->sctp_ep, stcb->asoc.deleted_primary);
+ sctp_auditing(4, stcb->sctp_ep, stcb, stcb->asoc.deleted_primary);
#endif
sctp_chunk_output(stcb->sctp_ep, stcb, SCTP_OUTPUT_FROM_T3, SCTP_SO_NOT_LOCKED);
if ((stcb->asoc.num_send_timers_up == 0) &&
diff --git a/sys/netinet/sctp_indata.c b/sys/netinet/sctp_indata.c
index c1430a5..4b00fc3 100644
--- a/sys/netinet/sctp_indata.c
+++ b/sys/netinet/sctp_indata.c
@@ -2823,25 +2823,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *offset, int length,
stcb->asoc.send_sack = 1;
}
/* Start a sack timer or QUEUE a SACK for sending */
- if ((stcb->asoc.cumulative_tsn == stcb->asoc.highest_tsn_inside_nr_map) &&
- (stcb->asoc.nr_mapping_array[0] != 0xff)) {
- if ((stcb->asoc.data_pkts_seen >= stcb->asoc.sack_freq) ||
- (stcb->asoc.delayed_ack == 0) ||
- (stcb->asoc.numduptsns) ||
- (stcb->asoc.send_sack == 1)) {
- if (SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) {
- (void)SCTP_OS_TIMER_STOP(&stcb->asoc.dack_timer.timer);
- }
- sctp_send_sack(stcb);
- } else {
- if (!SCTP_OS_TIMER_PENDING(&stcb->asoc.dack_timer.timer)) {
- sctp_timer_start(SCTP_TIMER_TYPE_RECV,
- stcb->sctp_ep, stcb, NULL);
- }
- }
- } else {
- sctp_sack_check(stcb, was_a_gap, &abort_flag);
- }
+ sctp_sack_check(stcb, was_a_gap, &abort_flag);
if (abort_flag)
return (2);
@@ -3532,6 +3514,25 @@ sctp_strike_gap_ack_chunks(struct sctp_tcb *stcb, struct sctp_association *asoc,
if (tp1->sent == SCTP_DATAGRAM_RESEND) {
struct sctp_nets *alt;
+ if ((stcb->asoc.peer_supports_prsctp) &&
+ (PR_SCTP_RTX_ENABLED(tp1->flags))) {
+ /*
+ * Has it been retransmitted tv_sec times? -
+ * we store the retran count there.
+ */
+ if (tp1->snd_count > tp1->rec.data.timetodrop.tv_sec) {
+ /* Yes, so drop it */
+ if (tp1->data != NULL) {
+ (void)sctp_release_pr_sctp_chunk(stcb, tp1,
+ (SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_SENT),
+ SCTP_SO_NOT_LOCKED);
+ }
+ /* Make sure to flag we had a FR */
+ tp1->whoTo->net_ack++;
+ tp1 = TAILQ_NEXT(tp1, sctp_next);
+ continue;
+ }
+ }
/* fix counts and things */
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_FLIGHT_LOGGING_ENABLE) {
sctp_misc_ints(SCTP_FLIGHT_LOG_DOWN_RSND,
@@ -3554,25 +3555,6 @@ sctp_strike_gap_ack_chunks(struct sctp_tcb *stcb, struct sctp_association *asoc,
/* remove from the total flight */
sctp_total_flight_decrease(stcb, tp1);
- if ((stcb->asoc.peer_supports_prsctp) &&
- (PR_SCTP_RTX_ENABLED(tp1->flags))) {
- /*
- * Has it been retransmitted tv_sec times? -
- * we store the retran count there.
- */
- if (tp1->snd_count > tp1->rec.data.timetodrop.tv_sec) {
- /* Yes, so drop it */
- if (tp1->data != NULL) {
- (void)sctp_release_pr_sctp_chunk(stcb, tp1,
- (SCTP_RESPONSE_TO_USER_REQ | SCTP_NOTIFY_DATAGRAM_SENT),
- SCTP_SO_NOT_LOCKED);
- }
- /* Make sure to flag we had a FR */
- tp1->whoTo->net_ack++;
- tp1 = TAILQ_NEXT(tp1, sctp_next);
- continue;
- }
- }
/* printf("OK, we are now ready to FR this guy\n"); */
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_FR_LOGGING_ENABLE) {
sctp_log_fr(tp1->rec.data.TSN_seq, tp1->snd_count,
diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c
index 26122ce..04f7673 100644
--- a/sys/netinet/sctputil.c
+++ b/sys/netinet/sctputil.c
@@ -674,7 +674,7 @@ sctp_auditing(int from, struct sctp_inpcb *inp, struct sctp_tcb *stcb,
sctp_audit_indx = 0;
}
rep = 1;
- SCTP_PRINTF("tot_flt_book:%d\n", tot_book);
+ SCTP_PRINTF("tot_flt_book:%d\n", tot_book_cnt);
stcb->asoc.total_flight_count = tot_book_cnt;
}
@@ -703,8 +703,8 @@ sctp_auditing(int from, struct sctp_inpcb *inp, struct sctp_tcb *stcb,
}
}
if (lnet->flight_size != tot_out) {
- SCTP_PRINTF("net:%x flight was %d corrected to %d\n",
- (uint32_t) lnet, lnet->flight_size,
+ SCTP_PRINTF("net:%p flight was %d corrected to %d\n",
+ lnet, lnet->flight_size,
tot_out);
lnet->flight_size = tot_out;
}
OpenPOWER on IntegriCloud