From 79e2da156c7040ba56a92e6fb8fa9ad7f877fa00 Mon Sep 17 00:00:00 2001 From: Bryan Biedenkapp Date: Sat, 21 Mar 2026 18:59:08 -0400 Subject: [PATCH] ensure SysView always is permitted and violatess even inclusion rules; --- src/fne/network/callhandler/TagAnalogData.cpp | 14 ++++++++++---- src/fne/network/callhandler/TagDMRData.cpp | 14 ++++++++++---- src/fne/network/callhandler/TagNXDNData.cpp | 14 ++++++++++---- src/fne/network/callhandler/TagP25Data.cpp | 14 ++++++++++---- 4 files changed, 40 insertions(+), 16 deletions(-) diff --git a/src/fne/network/callhandler/TagAnalogData.cpp b/src/fne/network/callhandler/TagAnalogData.cpp index 6ad3d13c..bd5db529 100644 --- a/src/fne/network/callhandler/TagAnalogData.cpp +++ b/src/fne/network/callhandler/TagAnalogData.cpp @@ -566,12 +566,18 @@ bool TagAnalogData::isPeerPermitted(uint32_t peerId, data::NetData& data, uint32 connection = m_network->m_peers[peerId]; } - // is this peer a replica peer? if (connection != nullptr) { + // is this peer a replica peer? if (connection->isReplica()) { return true; // replica peers are *always* allowed to receive traffic and no other rules may filter // these peers } + + // is this peer a SysView peer? + if (connection->peerClass() == PEER_CONN_CLASS_SYSVIEW) { + return true; // SysView peers are *always* allowed to receive traffic and no other rules may filter + // these peers + } } // is this a group call? @@ -616,11 +622,11 @@ bool TagAnalogData::isPeerPermitted(uint32_t peerId, data::NetData& data, uint32 } } - // is this peer a SysView or console peer? + // is this peer a console peer? if (connection != nullptr) { - if (connection->peerClass() == PEER_CONN_CLASS_SYSVIEW || connection->peerClass() == PEER_CONN_CLASS_CONSOLE) { + if (connection->peerClass() == PEER_CONN_CLASS_CONSOLE) { fromUpstream = true; // we'll just set the fromUpstream flag to disable the affiliation check - // for SysView or console peers + // for console peers } } diff --git a/src/fne/network/callhandler/TagDMRData.cpp b/src/fne/network/callhandler/TagDMRData.cpp index 504084af..4680310c 100644 --- a/src/fne/network/callhandler/TagDMRData.cpp +++ b/src/fne/network/callhandler/TagDMRData.cpp @@ -975,12 +975,18 @@ bool TagDMRData::isPeerPermitted(uint32_t peerId, data::NetData& data, uint32_t connection = m_network->m_peers[peerId]; } - // is this peer a replica peer? if (connection != nullptr) { + // is this peer a replica peer? if (connection->isReplica()) { return true; // replica peers are *always* allowed to receive traffic and no other rules may filter // these peers } + + // is this peer a SysView peer? + if (connection->peerClass() == PEER_CONN_CLASS_SYSVIEW) { + return true; // SysView peers are *always* allowed to receive traffic and no other rules may filter + // these peers + } } // is this a group call? @@ -1025,11 +1031,11 @@ bool TagDMRData::isPeerPermitted(uint32_t peerId, data::NetData& data, uint32_t } } - // is this peer a SysView or console peer? + // is this peer a console peer? if (connection != nullptr) { - if (connection->peerClass() == PEER_CONN_CLASS_SYSVIEW || connection->peerClass() == PEER_CONN_CLASS_CONSOLE) { + if (connection->peerClass() == PEER_CONN_CLASS_CONSOLE) { fromUpstream = true; // we'll just set the fromUpstream flag to disable the affiliation check - // for SysView or console peers + // for console peers } } diff --git a/src/fne/network/callhandler/TagNXDNData.cpp b/src/fne/network/callhandler/TagNXDNData.cpp index 79dab8e3..54b6e5b4 100644 --- a/src/fne/network/callhandler/TagNXDNData.cpp +++ b/src/fne/network/callhandler/TagNXDNData.cpp @@ -849,12 +849,18 @@ bool TagNXDNData::isPeerPermitted(uint32_t peerId, lc::RTCH& lc, uint8_t message connection = m_network->m_peers[peerId]; } - // is this peer a replica peer? if (connection != nullptr) { + // is this peer a replica peer? if (connection->isReplica()) { return true; // replica peers are *always* allowed to receive traffic and no other rules may filter // these peers } + + // is this peer a SysView peer? + if (connection->peerClass() == PEER_CONN_CLASS_SYSVIEW) { + return true; // SysView peers are *always* allowed to receive traffic and no other rules may filter + // these peers + } } // is this a group call? @@ -899,11 +905,11 @@ bool TagNXDNData::isPeerPermitted(uint32_t peerId, lc::RTCH& lc, uint8_t message } } - // is this peer a SysView or console peer? + // is this peer a console peer? if (connection != nullptr) { - if (connection->peerClass() == PEER_CONN_CLASS_SYSVIEW || connection->peerClass() == PEER_CONN_CLASS_CONSOLE) { + if (connection->peerClass() == PEER_CONN_CLASS_CONSOLE) { fromUpstream = true; // we'll just set the fromUpstream flag to disable the affiliation check - // for SysView or console peers + // for console peers } } diff --git a/src/fne/network/callhandler/TagP25Data.cpp b/src/fne/network/callhandler/TagP25Data.cpp index 1b3d28f5..ea40561a 100644 --- a/src/fne/network/callhandler/TagP25Data.cpp +++ b/src/fne/network/callhandler/TagP25Data.cpp @@ -1372,12 +1372,18 @@ bool TagP25Data::isPeerPermitted(uint32_t peerId, lc::LC& control, DUID::E duid, connection = m_network->m_peers[peerId]; } - // is this peer a replica peer? if (connection != nullptr) { + // is this peer a replica peer? if (connection->isReplica()) { return true; // replica peers are *always* allowed to receive traffic and no other rules may filter // these peers } + + // is this peer a SysView peer? + if (connection->peerClass() == PEER_CONN_CLASS_SYSVIEW) { + return true; // SysView peers are *always* allowed to receive traffic and no other rules may filter + // these peers + } } // always permit a TSDU or PDU @@ -1467,11 +1473,11 @@ bool TagP25Data::isPeerPermitted(uint32_t peerId, lc::LC& control, DUID::E duid, } } - // is this peer a SysView or console peer? + // is this peer a console peer? if (connection != nullptr) { - if (connection->peerClass() == PEER_CONN_CLASS_SYSVIEW || connection->peerClass() == PEER_CONN_CLASS_CONSOLE) { + if (connection->peerClass() == PEER_CONN_CLASS_CONSOLE) { fromUpstream = true; // we'll just set the fromUpstream flag to disable the affiliation check - // for SysView or console peers + // for console peers } }