diff options
author | Sridhar Samudrala <sri@us.ibm.com> | 2006-07-21 17:49:07 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-07-21 17:49:07 -0400 |
commit | 9faa730f1cbb951e95cb18e71b0fe265014c2450 (patch) | |
tree | 9474ff995e1cd8ddc6fb44974a4dde7b3d68f14b | |
parent | ad8fec1720e000ba2384de6408076a60fc92a981 (diff) |
[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>
-rw-r--r-- | net/sctp/sm_statefuns.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index e8498dce5335..ead3f1b0ea3d 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c | |||
@@ -5283,7 +5283,6 @@ static int sctp_eat_data(const struct sctp_association *asoc, | |||
5283 | datalen -= sizeof(sctp_data_chunk_t); | 5283 | datalen -= sizeof(sctp_data_chunk_t); |
5284 | 5284 | ||
5285 | deliver = SCTP_CMD_CHUNK_ULP; | 5285 | deliver = SCTP_CMD_CHUNK_ULP; |
5286 | chunk->data_accepted = 1; | ||
5287 | 5286 | ||
5288 | /* Think about partial delivery. */ | 5287 | /* Think about partial delivery. */ |
5289 | if ((datalen >= asoc->rwnd) && (!asoc->ulpq.pd_mode)) { | 5288 | if ((datalen >= asoc->rwnd) && (!asoc->ulpq.pd_mode)) { |
@@ -5362,6 +5361,8 @@ static int sctp_eat_data(const struct sctp_association *asoc, | |||
5362 | if (SCTP_CMD_CHUNK_ULP == deliver) | 5361 | if (SCTP_CMD_CHUNK_ULP == deliver) |
5363 | sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_TSN, SCTP_U32(tsn)); | 5362 | sctp_add_cmd_sf(commands, SCTP_CMD_REPORT_TSN, SCTP_U32(tsn)); |
5364 | 5363 | ||
5364 | chunk->data_accepted = 1; | ||
5365 | |||
5365 | /* Note: Some chunks may get overcounted (if we drop) or overcounted | 5366 | /* Note: Some chunks may get overcounted (if we drop) or overcounted |
5366 | * if we renege and the chunk arrives again. | 5367 | * if we renege and the chunk arrives again. |
5367 | */ | 5368 | */ |