diff options
author | rrs <rrs@FreeBSD.org> | 2010-06-09 16:39:18 +0000 |
---|---|---|
committer | rrs <rrs@FreeBSD.org> | 2010-06-09 16:39:18 +0000 |
commit | d1171df90509ec32624204192919e7fc10b9526b (patch) | |
tree | 2a3cadd64f7d8affa4cae3e2194896874f8841fd | |
parent | bc3fa141faa10d927d568bb1f958d736c5f6edcd (diff) | |
download | FreeBSD-src-d1171df90509ec32624204192919e7fc10b9526b.zip FreeBSD-src-d1171df90509ec32624204192919e7fc10b9526b.tar.gz |
BUG:Turns out we need to use both bit maps
to calculate the cum-ack (we were not doing
it for the NR-Sack case). With this fix
NR-sack should now work correctly.
MFC after: 1 week
-rw-r--r-- | sys/netinet/sctp_indata.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/sys/netinet/sctp_indata.c b/sys/netinet/sctp_indata.c index c04b25a..e792648 100644 --- a/sys/netinet/sctp_indata.c +++ b/sys/netinet/sctp_indata.c @@ -2267,7 +2267,6 @@ sctp_slide_mapping_arrays(struct sctp_tcb *stcb) uint8_t val; int slide_from, slide_end, lgap, distance; uint32_t old_cumack, old_base, old_highest, highest_tsn; - int type; asoc = &stcb->asoc; at = 0; @@ -2279,18 +2278,9 @@ sctp_slide_mapping_arrays(struct sctp_tcb *stcb) * We could probably improve this a small bit by calculating the * offset of the current cum-ack as the starting point. */ - if (SCTP_BASE_SYSCTL(sctp_nr_sack_on_off) && - stcb->asoc.peer_supports_nr_sack) { - type = SCTP_NR_SELECTIVE_ACK; - } else { - type = SCTP_SELECTIVE_ACK; - } at = 0; for (slide_from = 0; slide_from < stcb->asoc.mapping_array_size; slide_from++) { - if (type == SCTP_NR_SELECTIVE_ACK) - val = asoc->nr_mapping_array[slide_from]; - else - val = asoc->nr_mapping_array[slide_from] | asoc->mapping_array[slide_from]; + val = asoc->nr_mapping_array[slide_from] | asoc->mapping_array[slide_from]; if (val == 0xff) { at += 8; } else { |