From 3108b6a6158b46a6d0660a893a9090238bc844ff Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Sat, 22 Dec 2018 08:39:39 -0800 Subject: [PATCH] [posix-app] discard received HDLC frame on error (#3394) This commit changes the `HdlcInterface::HandleHdlcFrame()` callback which handles a received and decoded HDLC frame such that it discards a bad/incorrect frame from the multi frame buffer (i.e, discard the frame on any error). --- src/posix/platform/hdlc_interface.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/posix/platform/hdlc_interface.cpp b/src/posix/platform/hdlc_interface.cpp index d531d965b..f26ab644a 100644 --- a/src/posix/platform/hdlc_interface.cpp +++ b/src/posix/platform/hdlc_interface.cpp @@ -499,6 +499,7 @@ void HdlcInterface::HandleHdlcFrame(otError aError) } else { + mRxFrameBuffer.DiscardFrame(); otLogWarnPlat("Error decoding hdlc frame: %s", otThreadErrorToString(aError)); } }