diff options
author | tuexen <tuexen@FreeBSD.org> | 2010-12-16 21:01:02 +0000 |
---|---|---|
committer | tuexen <tuexen@FreeBSD.org> | 2010-12-16 21:01:02 +0000 |
commit | 8bce5df51898fc82ba0869633041d697295d14bf (patch) | |
tree | deecf1504bcde5528fb54ab3a5ef526afc1734a6 /sys/netinet/sctp_indata.c | |
parent | 595eb1de94cae05d53df41a69722750b50bb1a29 (diff) | |
download | FreeBSD-src-8bce5df51898fc82ba0869633041d697295d14bf.zip FreeBSD-src-8bce5df51898fc82ba0869633041d697295d14bf.tar.gz |
Bugfix: Take also the nr-mapping array into account when detecting
gaps.
Reviewed by: rrs@
MFC after: 3 days.
Diffstat (limited to 'sys/netinet/sctp_indata.c')
-rw-r--r-- | sys/netinet/sctp_indata.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/netinet/sctp_indata.c b/sys/netinet/sctp_indata.c index f028ebd..3300c97 100644 --- a/sys/netinet/sctp_indata.c +++ b/sys/netinet/sctp_indata.c @@ -2585,8 +2585,9 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *offset, int length, int num_chunks = 0; /* number of control chunks processed */ int stop_proc = 0; int chk_length, break_flag, last_chunk; - int abort_flag = 0, was_a_gap = 0; + int abort_flag = 0, was_a_gap; struct mbuf *m; + uint32_t highest_tsn; /* set the rwnd */ sctp_set_rwnd(stcb, &stcb->asoc); @@ -2594,11 +2595,12 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *offset, int length, m = *mm; SCTP_TCB_LOCK_ASSERT(stcb); asoc = &stcb->asoc; - if (compare_with_wrap(stcb->asoc.highest_tsn_inside_map, - stcb->asoc.cumulative_tsn, MAX_TSN)) { - /* there was a gap before this data was processed */ - was_a_gap = 1; + if (compare_with_wrap(asoc->highest_tsn_inside_nr_map, asoc->highest_tsn_inside_map, MAX_TSN)) { + highest_tsn = asoc->highest_tsn_inside_nr_map; + } else { + highest_tsn = asoc->highest_tsn_inside_map; } + was_a_gap = compare_with_wrap(highest_tsn, stcb->asoc.cumulative_tsn, MAX_TSN); /* * setup where we got the last DATA packet from for any SACK that * may need to go out. Don't bump the net. This is done ONLY when a |