diff options
author | Michael Tuexen <tuexen@FreeBSD.org> | 2010-12-22 17:59:38 +0000 |
---|---|---|
committer | Michael Tuexen <tuexen@FreeBSD.org> | 2010-12-22 17:59:38 +0000 |
commit | 7c99d56fdf69f608218a82e6eae1c54752f08f5e (patch) | |
tree | 80303e0e707760d51274d8c8dfdfdf5f3083faab /sys/netinet/sctp_output.c | |
parent | baf7e5ea7b7c87cdc9505b0c8f558484fad77a1e (diff) | |
download | src-7c99d56fdf69f608218a82e6eae1c54752f08f5e.tar.gz src-7c99d56fdf69f608218a82e6eae1c54752f08f5e.zip |
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.
Notes
Notes:
svn path=/head/; revision=216669
Diffstat (limited to 'sys/netinet/sctp_output.c')
-rw-r--r-- | sys/netinet/sctp_output.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index d8bc9aa50596..4ae66ad02d78 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -3686,7 +3686,7 @@ sctp_lowlevel_chunk_output(struct sctp_inpcb *inp, * 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_OUTPUT1, "Destination %p moved from PF to unreachable.\n", @@ -7325,7 +7325,7 @@ sctp_fill_outqueue(struct sctp_tcb *stcb, (net == stcb->asoc.primary_destination)) { /* ran dry for primary network net */ SCTP_STAT_INCR(sctps_primary_randry); - } else if (stcb->asoc.sctp_cmt_on_off == 1) { + } else if (stcb->asoc.sctp_cmt_on_off > 0) { /* ran dry with CMT on */ SCTP_STAT_INCR(sctps_cmt_randry); } @@ -7526,7 +7526,7 @@ sctp_med_chunk_output(struct sctp_inpcb *inp, *reason_code = 8; return (0); } - if (asoc->sctp_cmt_on_off == 1) { + if (asoc->sctp_cmt_on_off > 0) { /* get the last start point */ start_at = asoc->last_net_cmt_send_started; if (start_at == NULL) { @@ -8028,7 +8028,7 @@ again_one_more_time: } } /* JRI: if dest is in PF state, do not send data to it */ - if ((asoc->sctp_cmt_on_off == 1) && + if ((asoc->sctp_cmt_on_off > 0) && (asoc->sctp_cmt_pf > 0) && (net->dest_state & SCTP_ADDR_PF)) { goto no_data_fill; @@ -8036,7 +8036,7 @@ again_one_more_time: if (net->flight_size >= net->cwnd) { goto no_data_fill; } - if ((asoc->sctp_cmt_on_off == 1) && + if ((asoc->sctp_cmt_on_off > 0) && (SCTP_BASE_SYSCTL(sctp_buffer_splitting) & SCTP_RECV_BUFFER_SPLITTING) && (net->flight_size > max_rwnd_per_dest)) { goto no_data_fill; @@ -8047,7 +8047,7 @@ again_one_more_time: * net. For now, this is better than nothing and it disabled * by default... */ - if ((asoc->sctp_cmt_on_off == 1) && + if ((asoc->sctp_cmt_on_off > 0) && (SCTP_BASE_SYSCTL(sctp_buffer_splitting) & SCTP_SEND_BUFFER_SPLITTING) && (max_send_per_dest > 0) && (net->flight_size > max_send_per_dest)) { @@ -8268,7 +8268,7 @@ no_data_fill: * restart it. */ sctp_timer_start(SCTP_TIMER_TYPE_SEND, inp, stcb, net); - } else if ((asoc->sctp_cmt_on_off == 1) && + } else if ((asoc->sctp_cmt_on_off > 0) && (asoc->sctp_cmt_pf > 0) && pf_hbflag && ((net->dest_state & SCTP_ADDR_PF) == SCTP_ADDR_PF) && @@ -9576,7 +9576,7 @@ sctp_chunk_output(struct sctp_inpcb *inp, */ if (net->ref_count > 1) sctp_move_chunks_from_net(stcb, net); - } else if ((asoc->sctp_cmt_on_off == 1) && + } else if ((asoc->sctp_cmt_on_off > 0) && (asoc->sctp_cmt_pf > 0) && ((net->dest_state & SCTP_ADDR_PF) == SCTP_ADDR_PF)) { /* @@ -10073,7 +10073,7 @@ sctp_send_sack(struct sctp_tcb *stcb) else flags = 0; - if ((asoc->sctp_cmt_on_off == 1) && + if ((asoc->sctp_cmt_on_off > 0) && SCTP_BASE_SYSCTL(sctp_cmt_use_dac)) { /*- * CMT DAC algorithm: If 2 (i.e., 0x10) packets have been |