From db9e83cbc88395dd5732e28ae30fd375e77b0e65 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 28 May 2024 15:33:13 +0200 Subject: [PATCH 1/3] PLOC SUPV bugfix --- CHANGELOG.md | 11 +++++++++++ linux/payload/FreshSupvHandler.cpp | 7 +++++++ linux/payload/plocSupvDefs.h | 1 + 3 files changed, 19 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 360ff839..8d41eabd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,17 @@ will consitute of a breaking change warranting a new major release: # [unreleased] +# [v8.0.1] 2024-05-28 + +## Fixed + +- Important bugfix for PLOC SUPV: The SUPV previously was able to steal packets from the special + communication helper, for eample during software updates. + +## Added + +- Added new command to cancel the PLOC SUPV special communication helper. + # [v8.0.0] 2024-05-13 - `eive-tmtc` v7.0.0 diff --git a/linux/payload/FreshSupvHandler.cpp b/linux/payload/FreshSupvHandler.cpp index 1252f9d8..2c38c821 100644 --- a/linux/payload/FreshSupvHandler.cpp +++ b/linux/payload/FreshSupvHandler.cpp @@ -241,6 +241,9 @@ ReturnValue_t FreshSupvHandler::executeAction(ActionId_t actionId, MessageQueueI uartManager->initiateUpdateContinuation(); return EXECUTION_FINISHED; } + case ABORT_LONGER_REQUEST: { + uartManager->stop(); + } case MEMORY_CHECK_WITH_FILE: { UpdateParams params; result = extractBaseParams(&data, size, params); @@ -849,6 +852,10 @@ ReturnValue_t FreshSupvHandler::prepareWipeMramCmd(const uint8_t* commandData, s ReturnValue_t FreshSupvHandler::parseTmPackets() { uint8_t* receivedData = nullptr; size_t receivedSize = 0; + // We do not want to steal packets from the long request handler. + if (uartManager->longerRequestActive()) { + return returnvalue::OK; + } while (true) { ReturnValue_t result = uartManager->readReceivedMessage(comCookie, &receivedData, &receivedSize); diff --git a/linux/payload/plocSupvDefs.h b/linux/payload/plocSupvDefs.h index 349c29ad..e6536713 100644 --- a/linux/payload/plocSupvDefs.h +++ b/linux/payload/plocSupvDefs.h @@ -159,6 +159,7 @@ static const DeviceCommandId_t ENABLE_NVMS = 59; static const DeviceCommandId_t CONTINUE_UPDATE = 60; static const DeviceCommandId_t MEMORY_CHECK_WITH_FILE = 61; static constexpr DeviceCommandId_t MEMORY_CHECK = 62; +static constexpr DeviceCommandId_t ABORT_LONGER_REQUEST = 63; /** Reply IDs */ enum ReplyId : DeviceCommandId_t { From 6350e0db0a164709299fda05b044fb7dcf9a68e3 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 28 May 2024 15:36:49 +0200 Subject: [PATCH 2/3] changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d41eabd..777f4648 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,7 +21,7 @@ will consitute of a breaking change warranting a new major release: ## Fixed - Important bugfix for PLOC SUPV: The SUPV previously was able to steal packets from the special - communication helper, for eample during software updates. + communication helper, for example during software updates. ## Added From a3ac2505fedf616527fc2b0b0ffc4ede2ad00555 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 28 May 2024 15:38:16 +0200 Subject: [PATCH 3/3] small tweak --- linux/payload/FreshSupvHandler.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/linux/payload/FreshSupvHandler.cpp b/linux/payload/FreshSupvHandler.cpp index 2c38c821..ef980bb4 100644 --- a/linux/payload/FreshSupvHandler.cpp +++ b/linux/payload/FreshSupvHandler.cpp @@ -243,6 +243,7 @@ ReturnValue_t FreshSupvHandler::executeAction(ActionId_t actionId, MessageQueueI } case ABORT_LONGER_REQUEST: { uartManager->stop(); + return EXECUTION_FINISHED; } case MEMORY_CHECK_WITH_FILE: { UpdateParams params;