Skip to content

Commit b5f2e1a

Browse files
authored
Throttle Auth Events Downstream (#263)
* throttling events that invalid packets make * added rejection event (throttled) * only radio
1 parent b91d35a commit b5f2e1a

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

FprimeZephyrReference/Components/Authenticate/Authenticate.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ U32 Authenticate::writeSequenceNumber(const char* filepath, U32 value) {
6161
}
6262

6363
void Authenticate::rejectPacket(Fw::Buffer& data, ComCfg::FrameContext& contextOut) {
64+
this->log_WARNING_HI_PacketRejected();
6465
U32 newCount = this->m_rejectedPacketsCount.fetch_add(1) + 1;
6566
this->tlmWrite_RejectedPacketsCount(newCount);
6667
contextOut.set_authenticated(0);

FprimeZephyrReference/Components/Authenticate/Authenticate.fpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,11 @@ module Components {
3939

4040
event PacketTooShort(packet_size: U32) severity warning high id 12 format "Received packet is too short ({}) to process for authentication" throttle 2
4141

42-
event InvalidHeader(apid: U32, spi: U32, seqNum: U32) severity warning high id 14 format "Invalid header in packet: APID={}, SPI={}, SeqNum={}" throttle 2
42+
event InvalidHeader(apid: U32, spi: U32, seqNum: U32) severity warning high id 13 format "Invalid header in packet: APID={}, SPI={}, SeqNum={}" throttle 2
4343

44-
event CryptoComputationError(status: U32) severity warning high id 13 format "Crypto Computation Error: {}" throttle 2
44+
event CryptoComputationError(status: U32) severity warning high id 14 format "Crypto Computation Error: {}" throttle 2
45+
46+
event PacketRejected() severity warning high id 15 format "Packet Rejected" throttle 2
4547

4648

4749
# @ Ports for packet authentication

sequences/startup.seq

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
R00:00:00 CdhCore.events.SET_ID_FILTER, 570462208, ENABLED ; LORA APID unexpected sequence count
2+
R00:00:00 CdhCore.events.SET_ID_FILTER, 553668608, ENABLED ; Invalid Length (SpacePacketDeframer)
3+
14
R00:00:00 ReferenceDeployment.startupManager.WAIT_FOR_QUIESCENCE
25
R00:00:00 ReferenceDeployment.antennaDeployer.DEPLOY
36

0 commit comments

Comments
 (0)