Skip to content

Commit 15ceb66

Browse files
authored
Fix E2E protection checker counter increment (#889)
Bug introduced by 826ebb8. E2E checkers should always update the local counters by the received counters after determining the counter deltas in `verify_counter`.
1 parent 687ef6a commit 15ceb66

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

implementation/e2e_protection/src/e2e/profile/profile04/checker.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ bool profile_04_checker::verify_counter(instance_t _instance, uint16_t _received
7777
its_delta = uint16_t(_received_counter - its_counter);
7878
else
7979
its_delta = uint16_t(uint16_t(0xffff) - its_counter + _received_counter);
80+
81+
find_counter->second = _received_counter;
8082
} else {
8183
counter_[_instance] = _received_counter;
8284
}

implementation/e2e_protection/src/e2e/profile/profile05/checker.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ bool profile_05_checker::verify_counter(instance_t _instance, uint8_t _received_
5858
its_delta = uint8_t(_received_counter - its_counter);
5959
else
6060
its_delta = uint8_t(uint8_t(0xff) - its_counter + _received_counter);
61+
62+
find_counter->second = _received_counter;
6163
} else {
6264
counter_[_instance] = _received_counter;
6365
}

implementation/e2e_protection/src/e2e/profile/profile07/checker.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ bool profile_07_checker::verify_counter(instance_t _instance, uint32_t _received
7171
its_delta = uint32_t(_received_counter - its_counter);
7272
else
7373
its_delta = uint32_t(uint32_t(0xffffffff) - its_counter + _received_counter);
74+
75+
find_counter->second = _received_counter;
7476
} else {
7577
counter_[_instance] = _received_counter;
7678
}

0 commit comments

Comments
 (0)