summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctp_indata.c
diff options
context:
space:
mode:
authorrrs <rrs@FreeBSD.org>2009-04-08 12:52:05 +0000
committerrrs <rrs@FreeBSD.org>2009-04-08 12:52:05 +0000
commit1b546b35c31692ba69313aba5e98fc58995f3ac2 (patch)
treeca2e3ab8895a008b21af6b01d6693e06a06f6129 /sys/netinet/sctp_indata.c
parent0d84cb3f8bc0b9eea5d825ea332bd06bbb069e1e (diff)
downloadFreeBSD-src-1b546b35c31692ba69313aba5e98fc58995f3ac2.zip
FreeBSD-src-1b546b35c31692ba69313aba5e98fc58995f3ac2.tar.gz
Fix a FR bug. When doing PR-SCTP with number rtx
set to a low number. The check for skipping was in the incorrect place. Which meant we would FR chunks we should not. MFC after: 1 Month
Diffstat (limited to 'sys/netinet/sctp_indata.c')
-rw-r--r--sys/netinet/sctp_indata.c32
1 files changed, 19 insertions, 13 deletions
diff --git a/sys/netinet/sctp_indata.c b/sys/netinet/sctp_indata.c
index a9f315c..98dc28e 100644
--- a/sys/netinet/sctp_indata.c
+++ b/sys/netinet/sctp_indata.c
@@ -3621,19 +3621,6 @@ sctp_strike_gap_ack_chunks(struct sctp_tcb *stcb, struct sctp_association *asoc,
continue;
}
}
- if ((PR_SCTP_RTX_ENABLED(tp1->flags)) && tp1->sent < SCTP_DATAGRAM_ACKED) {
- /* Has it been retransmitted tv_sec times? */
- 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);
- }
- tp1 = TAILQ_NEXT(tp1, sctp_next);
- continue;
- }
- }
}
if (compare_with_wrap(tp1->rec.data.TSN_seq,
asoc->this_sack_highest_gap, MAX_TSN)) {
@@ -3849,6 +3836,25 @@ sctp_strike_gap_ack_chunks(struct sctp_tcb *stcb, struct sctp_association *asoc,
/* Increment the count to 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;
+ }
+ }
/* 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,
OpenPOWER on IntegriCloud