X-Git-Url: https://bbs.cooldavid.org/git/?a=blobdiff_plain;f=net%2Fsctp%2Fsm_statefuns.c;h=ead3f1b0ea3dad20e0844cc3b21be2ac2d75fa9e;hb=9faa730f1cbb951e95cb18e71b0fe265014c2450;hp=e8498dce53354bbb1b53f9f3e98db12b2863d218;hpb=ad8fec1720e000ba2384de6408076a60fc92a981;p=net-next-2.6.git diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index e8498dce533..ead3f1b0ea3 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, datalen -= sizeof(sctp_data_chunk_t); deliver = SCTP_CMD_CHUNK_ULP; - chunk->data_accepted = 1; /* Think about partial delivery. */ 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) 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 * if we renege and the chunk arrives again. */