From 71438abb879bfceae3036431bb48ee202ee642fb Mon Sep 17 00:00:00 2001 From: Bryan Biedenkapp Date: Mon, 8 Jan 2024 12:03:01 -0500 Subject: [PATCH] consider peer IDs for systems the conference bridge is peered to for inclusion/exclusion lists; --- configs/fne-config.example.yml | 4 ++-- src/fne/network/fne/TagDMRData.cpp | 7 +++++++ src/fne/network/fne/TagNXDNData.cpp | 7 +++++++ src/fne/network/fne/TagP25Data.cpp | 7 +++++++ 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/configs/fne-config.example.yml b/configs/fne-config.example.yml index b9542137..36bb572f 100644 --- a/configs/fne-config.example.yml +++ b/configs/fne-config.example.yml @@ -1,7 +1,7 @@ # -# Digital Voice Modem - Host Software Configuration (FNE Conference Bridge Mode) +# Digital Voice Modem - Conference FNE Software Configuration # -# @package DVM / Host Software +# @package DVM / Conference FNE Software # # Flag indicating whether the host will run as a background or foreground task. diff --git a/src/fne/network/fne/TagDMRData.cpp b/src/fne/network/fne/TagDMRData.cpp index c749861a..2ad28a8b 100644 --- a/src/fne/network/fne/TagDMRData.cpp +++ b/src/fne/network/fne/TagDMRData.cpp @@ -229,6 +229,13 @@ bool TagDMRData::processFrame(const uint8_t* data, uint32_t len, uint32_t peerId // repeat traffic to upstream peers if (m_network->m_host->m_peerNetworks.size() > 0) { for (auto peer : m_network->m_host->m_peerNetworks) { + uint32_t peerId = peer.second->getPeerId(); + + // is this peer ignored? + if (!isPeerPermitted(peerId, dmrData, streamId)) { + continue; + } + peer.second->writeMaster({ NET_FUNC_PROTOCOL, NET_PROTOCOL_SUBFUNC_DMR }, data, len, pktSeq, streamId); } } diff --git a/src/fne/network/fne/TagNXDNData.cpp b/src/fne/network/fne/TagNXDNData.cpp index 5186e911..6f9474f7 100644 --- a/src/fne/network/fne/TagNXDNData.cpp +++ b/src/fne/network/fne/TagNXDNData.cpp @@ -201,6 +201,13 @@ bool TagNXDNData::processFrame(const uint8_t* data, uint32_t len, uint32_t peerI // repeat traffic to upstream peers if (m_network->m_host->m_peerNetworks.size() > 0) { for (auto peer : m_network->m_host->m_peerNetworks) { + uint32_t peerId = peer.second->getPeerId(); + + // is this peer ignored? + if (!isPeerPermitted(peerId, lc, messageType, streamId)) { + continue; + } + peer.second->writeMaster({ NET_FUNC_PROTOCOL, NET_PROTOCOL_SUBFUNC_NXDN }, data, len, pktSeq, streamId); } } diff --git a/src/fne/network/fne/TagP25Data.cpp b/src/fne/network/fne/TagP25Data.cpp index e004b37f..e401546e 100644 --- a/src/fne/network/fne/TagP25Data.cpp +++ b/src/fne/network/fne/TagP25Data.cpp @@ -243,6 +243,13 @@ bool TagP25Data::processFrame(const uint8_t* data, uint32_t len, uint32_t peerId // repeat traffic to upstream peers if (m_network->m_host->m_peerNetworks.size() > 0) { for (auto peer : m_network->m_host->m_peerNetworks) { + uint32_t peerId = peer.second->getPeerId(); + + // is this peer ignored? + if (!isPeerPermitted(peerId, control, duid, streamId)) { + continue; + } + peer.second->writeMaster({ NET_FUNC_PROTOCOL, NET_PROTOCOL_SUBFUNC_P25 }, data, len, pktSeq, streamId); } }