From 1b13e2d6a40df69cc8513bc4b2b537d3133e8598 Mon Sep 17 00:00:00 2001 From: Paul Hollinsky Date: Mon, 20 Sep 2021 19:38:00 -0400 Subject: [PATCH] MessageFilter: Ensure non-frames can be filtered by network type and ID --- include/icsneo/communication/message/filter/messagefilter.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/icsneo/communication/message/filter/messagefilter.h b/include/icsneo/communication/message/filter/messagefilter.h index 0ba85b0..51f3957 100644 --- a/include/icsneo/communication/message/filter/messagefilter.h +++ b/include/icsneo/communication/message/filter/messagefilter.h @@ -27,8 +27,9 @@ public: if(!matchMessageType(message->type)) return false; - if(message->type == Message::Type::Frame) { - Frame& frame = *static_cast(message.get()); + if(message->type == Message::Type::Frame || message->type == Message::Type::Main51 || + message->type == Message::Type::RawMessage || message->type == Message::Type::ReadSettings) { + RawMessage& frame = *static_cast(message.get()); if(!matchNetworkType(frame.network.getType())) return false; if(!matchNetID(frame.network.getNetID()))