From b7471733c5ed753863c08d7f26b0175c3c34940d Mon Sep 17 00:00:00 2001 From: Seth Rickard Date: Mon, 24 Oct 2022 17:07:34 -0500 Subject: [PATCH] [mac] add reserved value to source address parsing (#8326) Fails packet parsing if the reserved value is found in the source addressing field instead of marking the address as "none". --- src/core/mac/mac_frame.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/core/mac/mac_frame.cpp b/src/core/mac/mac_frame.cpp index 2f0b1d18c..e889e3467 100644 --- a/src/core/mac/mac_frame.cpp +++ b/src/core/mac/mac_frame.cpp @@ -378,9 +378,14 @@ Error Frame::GetSrcAddr(Address &aAddress) const aAddress.SetExtended(&mPsdu[index], ExtAddress::kReverseByteOrder); break; - default: + case kFcfSrcAddrNone: aAddress.SetNone(); break; + + default: + // reserved value + error = kErrorParse; + break; } exit: