Skip to content

Commit

Permalink
[SCTP]: Make sure the chunk is off the transmitted list prior to free…
Browse files Browse the repository at this point in the history
…ing.

In a few instances, we need to remove the chunk from the transmitted list
prior to freeing it.  This is because the free code doesn't do that any
more and so we need to do it manually.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
  • Loading branch information
Vlad Yasevich committed Feb 7, 2008
1 parent a869981 commit 5f9646c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion net/sctp/outqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -1179,8 +1179,10 @@ int sctp_outq_sack(struct sctp_outq *q, struct sctp_sackhdr *sack)
tchunk = list_entry(lchunk, struct sctp_chunk,
transmitted_list);
tsn = ntohl(tchunk->subh.data_hdr->tsn);
if (TSN_lte(tsn, ctsn))
if (TSN_lte(tsn, ctsn)) {
list_del_init(&tchunk->transmitted_list);
sctp_chunk_free(tchunk);
}
}

/* ii) Set rwnd equal to the newly received a_rwnd minus the
Expand Down
1 change: 1 addition & 0 deletions net/sctp/sm_make_chunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -3224,6 +3224,7 @@ int sctp_process_asconf_ack(struct sctp_association *asoc,
}

/* Free the cached last sent asconf chunk. */
list_del_init(&asconf->transmitted_list);
sctp_chunk_free(asconf);
asoc->addip_last_asconf = NULL;

Expand Down

0 comments on commit 5f9646c

Please sign in to comment.