summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctp_timer.c
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2010-12-22 17:59:38 +0000
committertuexen <tuexen@FreeBSD.org>2010-12-22 17:59:38 +0000
commitc17bd2abe06cae94dd7c76d82b5484b79b746af2 (patch)
tree80303e0e707760d51274d8c8dfdfdf5f3083faab /sys/netinet/sctp_timer.c
parentaa42d9f67fb8820598ba9b01c9f9de9a6525eba1 (diff)
downloadFreeBSD-src-c17bd2abe06cae94dd7c76d82b5484b79b746af2.zip
FreeBSD-src-c17bd2abe06cae94dd7c76d82b5484b79b746af2.tar.gz
Improve plausibility check in sctp_handle_sack().
Allow cmt_on_off to support values 0 (no CMT), 1 (CMT), and 2 (CMT/RP). MFC after: 3 months.
Diffstat (limited to 'sys/netinet/sctp_timer.c')
-rw-r--r--sys/netinet/sctp_timer.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/netinet/sctp_timer.c b/sys/netinet/sctp_timer.c
index 7e9dd29..74598af 100644
--- a/sys/netinet/sctp_timer.c
+++ b/sys/netinet/sctp_timer.c
@@ -215,7 +215,7 @@ sctp_threshold_management(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
* not in PF state.
*/
/* Stop any running T3 timers here? */
- if ((stcb->asoc.sctp_cmt_on_off == 1) &&
+ if ((stcb->asoc.sctp_cmt_on_off > 0) &&
(stcb->asoc.sctp_cmt_pf > 0)) {
net->dest_state &= ~SCTP_ADDR_PF;
SCTPDBG(SCTP_DEBUG_TIMER4, "Destination %p moved from PF to unreachable.\n",
@@ -850,7 +850,7 @@ start_again:
/*
* CMT: Do not allow FRs on retransmitted TSNs.
*/
- if (stcb->asoc.sctp_cmt_on_off == 1) {
+ if (stcb->asoc.sctp_cmt_on_off > 0) {
chk->no_fr_allowed = 1;
}
#ifdef THIS_SHOULD_NOT_BE_DONE
@@ -1005,7 +1005,7 @@ sctp_t3rxt_timer(struct sctp_inpcb *inp,
* addition, find an alternate destination with PF-based
* find_alt_net().
*/
- if ((stcb->asoc.sctp_cmt_on_off == 1) &&
+ if ((stcb->asoc.sctp_cmt_on_off > 0) &&
(stcb->asoc.sctp_cmt_pf > 0)) {
if ((net->dest_state & SCTP_ADDR_PF) != SCTP_ADDR_PF) {
net->dest_state |= SCTP_ADDR_PF;
@@ -1014,7 +1014,7 @@ sctp_t3rxt_timer(struct sctp_inpcb *inp,
net);
}
alt = sctp_find_alternate_net(stcb, net, 2);
- } else if (stcb->asoc.sctp_cmt_on_off == 1) {
+ } else if (stcb->asoc.sctp_cmt_on_off > 0) {
/*
* CMT: Using RTX_SSTHRESH policy for CMT. If CMT is being
* used, then pick dest with largest ssthresh for any
@@ -1129,7 +1129,7 @@ sctp_t3rxt_timer(struct sctp_inpcb *inp,
net->dest_state |= SCTP_ADDR_WAS_PRIMARY;
}
}
- } else if ((stcb->asoc.sctp_cmt_on_off == 1) &&
+ } else if ((stcb->asoc.sctp_cmt_on_off > 0) &&
(stcb->asoc.sctp_cmt_pf > 0) &&
((net->dest_state & SCTP_ADDR_PF) == SCTP_ADDR_PF)) {
/*
OpenPOWER on IntegriCloud