mesh: Ignore segments of cancelled message

This fixes the issue when after incomplete timer expiration
host sent ACK.
The host failed in two cases:
1. Sending ACK right after the incomplete timer expiration;
2. Sending ACK from new RX context. Now, seq_auth of cancelled
message is not cleaned on RX reset, so segments of cancelled message
will be discarded when resend.

According to the Mesh Profile v1.0
"When the incomplete timer expires, the lower transport layer
shall consider that the message being received has failed and
cancel the acknowledgment timer. Any segment of a canceled
message shall be ignored."

X-Original-Commit: 50e7d632932c4188849aee89e0d23e2207352601
This commit is contained in:
Michał Narajowski
2018-02-27 09:56:07 +01:00
parent d7fc4a5a11
commit 7ed968551e
+1 -3
View File
@@ -1009,9 +1009,7 @@ static void seg_ack(struct os_event *work)
if (k_uptime_get_32() - rx->last > K_SECONDS(60)) {
BT_WARN("Incomplete timer expired");
send_ack(rx->sub, rx->dst, rx->src, rx->ttl,
&rx->seq_auth, 0, rx->obo);
seg_rx_reset(rx, true);
seg_rx_reset(rx, false);
if (IS_ENABLED(CONFIG_BT_TESTING)) {
bt_test_mesh_trans_incomp_timer_exp();