[SCTP]: Set chunk->data_accepted only if we are going to accept it.
Currently there is a code path in sctp_eat_data() where it is possible to set this flag even when we are dropping this chunk. Signed-off-by: Sridhar Samudrala <sri@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
ad8fec1720
commit
9faa730f1c
@@ -5283,7 +5283,6 @@ static int sctp_eat_data(const struct sctp_association *asoc,
|
|||||||
datalen -= sizeof(sctp_data_chunk_t);
|
datalen -= sizeof(sctp_data_chunk_t);
|
||||||
|
|
||||||
deliver = SCTP_CMD_CHUNK_ULP;
|
deliver = SCTP_CMD_CHUNK_ULP;
|
||||||
chunk->data_accepted = 1;
|
|
||||||
|
|
||||||
/* Think about partial delivery. */
|
/* Think about partial delivery. */
|
||||||
if ((datalen >= asoc->rwnd) && (!asoc->ulpq.pd_mode)) {
|
if ((datalen >= asoc->rwnd) && (!asoc->ulpq.pd_mode)) {
|
||||||
@@ -5362,6 +5361,8 @@ static int sctp_eat_data(const struct sctp_association *asoc,
|
|||||||
if (SCTP_CMD_CHUNK_ULP == deliver)
|
if (SCTP_CMD_CHUNK_ULP == deliver)
|
||||||
sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_TSN, SCTP_U32(tsn));
|
sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_TSN, SCTP_U32(tsn));
|
||||||
|
|
||||||
|
chunk->data_accepted = 1;
|
||||||
|
|
||||||
/* Note: Some chunks may get overcounted (if we drop) or overcounted
|
/* Note: Some chunks may get overcounted (if we drop) or overcounted
|
||||||
* if we renege and the chunk arrives again.
|
* if we renege and the chunk arrives again.
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user