From a2cfc50b7c445d24332836768a55cd188c0e17fa Mon Sep 17 00:00:00 2001 From: Paul Hollinsky Date: Thu, 7 Apr 2022 13:05:34 -0400 Subject: [PATCH] Message Filter: Fix filtering on NetID or NetType if message doesn't have one --- include/icsneo/communication/message/filter/messagefilter.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/icsneo/communication/message/filter/messagefilter.h b/include/icsneo/communication/message/filter/messagefilter.h index fd76ac3..d512948 100644 --- a/include/icsneo/communication/message/filter/messagefilter.h +++ b/include/icsneo/communication/message/filter/messagefilter.h @@ -34,6 +34,8 @@ public: return false; if(!matchNetID(frame.network.getNetID())) return false; + } else if (netid != Network::NetID::Any || networkType != Network::Type::Any) { + return false; // Filtering on a NetID or Type, but this message doesn't have one } return true; }