Skip to content
Snippets Groups Projects
Commit e33fc9c6 authored by Michael Tüxen's avatar Michael Tüxen
Browse files

Merge pull request #84 from TheAomx/master

Fix for Issue 77
parents 7ec34089 e75b8bbf
No related branches found
No related tags found
No related merge requests found
...@@ -635,9 +635,13 @@ static int map_inbound_sctp_packet( ...@@ -635,9 +635,13 @@ static int map_inbound_sctp_packet(
DEBUGP("New SACK cum TSN %d\n", ntohl(sack->cum_tsn)); DEBUGP("New SACK cum TSN %d\n", ntohl(sack->cum_tsn));
nr_gap_blocks = ntohs(sack->nr_gap_blocks); nr_gap_blocks = ntohs(sack->nr_gap_blocks);
nr_dup_tsns = ntohs(sack->nr_dup_tsns); nr_dup_tsns = ntohs(sack->nr_dup_tsns);
for (i = 0; i < nr_dup_tsns; i++) {
sack->block[i + nr_gap_blocks].tsn = htonl(ntohl(sack->block[i + nr_gap_blocks].tsn) + local_diff); if (ntohs(sack->length) == sizeof(struct sctp_sack_chunk) + sizeof(union sctp_sack_block) * (nr_dup_tsns+nr_gap_blocks)) {
for (i = 0; i < nr_dup_tsns; i++) {
sack->block[i + nr_gap_blocks].tsn = htonl(ntohl(sack->block[i + nr_gap_blocks].tsn) + local_diff);
}
} }
break; break;
case SCTP_ABORT_CHUNK_TYPE: case SCTP_ABORT_CHUNK_TYPE:
abort = (struct sctp_abort_chunk *)chunk; abort = (struct sctp_abort_chunk *)chunk;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment