Commit 5f9646c3 authored by Vlad Yasevich's avatar Vlad Yasevich

[SCTP]: Make sure the chunk is off the transmitted list prior to freeing.

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: default avatarVlad Yasevich <vladislav.yasevich@hp.com>
parent a8699814
...@@ -1179,8 +1179,10 @@ int sctp_outq_sack(struct sctp_outq *q, struct sctp_sackhdr *sack) ...@@ -1179,8 +1179,10 @@ int sctp_outq_sack(struct sctp_outq *q, struct sctp_sackhdr *sack)
tchunk = list_entry(lchunk, struct sctp_chunk, tchunk = list_entry(lchunk, struct sctp_chunk,
transmitted_list); transmitted_list);
tsn = ntohl(tchunk->subh.data_hdr->tsn); 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); sctp_chunk_free(tchunk);
}
} }
/* ii) Set rwnd equal to the newly received a_rwnd minus the /* ii) Set rwnd equal to the newly received a_rwnd minus the
......
...@@ -3224,6 +3224,7 @@ int sctp_process_asconf_ack(struct sctp_association *asoc, ...@@ -3224,6 +3224,7 @@ int sctp_process_asconf_ack(struct sctp_association *asoc,
} }
/* Free the cached last sent asconf chunk. */ /* Free the cached last sent asconf chunk. */
list_del_init(&asconf->transmitted_list);
sctp_chunk_free(asconf); sctp_chunk_free(asconf);
asoc->addip_last_asconf = NULL; asoc->addip_last_asconf = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment