sctp: fix identification of new acks for SFR-CACC
authorMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Tue, 24 Apr 2018 21:17:35 +0000 (18:17 -0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 25 Apr 2018 17:22:07 +0000 (13:22 -0400)
commit51446780fc33e45cb790c05a7fa2c5bf7e8bc53b
tree7e19d85f9b7b9bf2aeb2f230e9e7a774b0896146
parent47b3ba5175e940c9be5fd6aec05d6e7e048ff823
sctp: fix identification of new acks for SFR-CACC

It's currently written as:

if (!tchunk->tsn_gap_acked) {   [1]
tchunk->tsn_gap_acked = 1;
...
}

if (TSN_lte(tsn, sack_ctsn)) {
if (!tchunk->tsn_gap_acked) {
/* SFR-CACC processing */
...
}
}

Which causes the SFR-CACC processing on ack reception to never process,
as tchunk->tsn_gap_acked is always true by then. Block [1] was
moved to that position by the commit marked below.

This patch fixes it by doing SFR-CACC processing earlier, before
tsn_gap_acked is set to true.

Fixes: 31b02e154940 ("sctp: Failover transmitted list on transport delete")
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Reviewed-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/outqueue.c