Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d6c41614 authored by Chang Xiangzhong's avatar Chang Xiangzhong Committed by David S. Miller
Browse files

net: sctp: find the correct highest_new_tsn in sack



Function sctp_check_transmitted(transport t, ...) would iterate all of
transport->transmitted queue and looking for the highest __newly__ acked tsn.
The original algorithm would depend on the order of the assoc->transport_list
(in function sctp_outq_sack line 1215 - 1226). The result might not be the
expected due to the order of the tranport_list.

Solution: checking if the exising is smaller than the new one before assigning

Signed-off-by: default avatarChang Xiangzhong <changxiangzhong@gmail.com>
Acked-by: default avatarVlad Yasevich <vyasevich@gmail.com>
Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9d8506cc
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1391,6 +1391,7 @@ static void sctp_check_transmitted(struct sctp_outq *q,
			 */
			if (!tchunk->tsn_gap_acked) {
				tchunk->tsn_gap_acked = 1;
				if (TSN_lt(*highest_new_tsn_in_sack, tsn))
					*highest_new_tsn_in_sack = tsn;
				bytes_acked += sctp_data_size(tchunk);
				if (!tchunk->transport)