add disablePacketData flag to disable the FNE passing packet data;

pull/61/head
Bryan Biedenkapp 2 years ago
parent c9e7dcc11f
commit 806f950665

@ -68,6 +68,8 @@ master:
# Flag indicating whether or not NXDN traffic will be passed.
allowNXDNTraffic: true
# Flag indicating whether packet data will be passed.
disablePacketData: false
# Flag indicating whether verbose dumping of data packets is enabled.
dumpDataPacket: false

@ -89,6 +89,7 @@ FNENetwork::FNENetwork(HostFNE* host, const std::string& address, uint16_t port,
m_influxOrg("dvm"),
m_influxBucket("dvm"),
m_influxLogRawData(false),
m_disablePacketData(false),
m_dumpDataPacket(false),
m_reportPeerPing(reportPeerPing),
m_verbose(verbose)
@ -147,6 +148,7 @@ void FNENetwork::setOptions(yaml::Node& conf, bool printOptions)
m_filterHeaders = conf["filterHeaders"].as<bool>(true);
m_filterTerminators = conf["filterTerminators"].as<bool>(true);
m_disablePacketData = conf["disablePacketData"].as<bool>(false);
m_dumpDataPacket = conf["dumpDataPacket"].as<bool>(false);
/*
@ -169,6 +171,7 @@ void FNENetwork::setOptions(yaml::Node& conf, bool printOptions)
if (m_disallowAdjStsBcast) {
LogWarning(LOG_NET, "NOTICE: All P25 ADJ_STS_BCAST messages will be blocked and dropped!");
}
LogInfo(" Disable Packet Data: %s", m_disablePacketData ? "yes" : "no");
LogInfo(" Dump Packet Data: %s", m_dumpDataPacket ? "yes" : "no");
LogInfo(" Disable P25 ADJ_STS_BCAST to external peers: %s", m_disallowExtAdjStsBcast ? "yes" : "no");
LogInfo(" Allow conventional sites to override affiliation and receive all traffic: %s", m_allowConvSiteAffOverride ? "yes" : "no");

@ -458,7 +458,9 @@ namespace network
bool m_influxLogRawData;
influxdb::ServerInfo m_influxServer;
bool m_disablePacketData;
bool m_dumpDataPacket;
bool m_reportPeerPing;
bool m_verbose;

@ -97,6 +97,14 @@ bool TagDMRData::processFrame(const uint8_t* data, uint32_t len, uint32_t peerId
dmrData.setN(n);
}
if (dataType == DataType::DATA_HEADER ||
dataType == DataType::RATE_12_DATA ||
dataType == DataType::RATE_34_DATA ||
dataType == DataType::RATE_1_DATA) {
if (m_network->m_disablePacketData)
return false;
}
// perform TGID route rewrites if configured
routeRewrite(buffer, peerId, dmrData, dataType, dstId, slotNo, false);
dstId = __GET_UINT16(buffer, 8U);

@ -66,6 +66,12 @@ bool TagNXDNData::processFrame(const uint8_t* data, uint32_t len, uint32_t peerI
uint32_t srcId = __GET_UINT16(data, 5U);
uint32_t dstId = __GET_UINT16(data, 8U);
if (messageType == MessageType::RTCH_DCALL_HDR ||
messageType == MessageType::RTCH_DCALL_DATA) {
if (m_network->m_disablePacketData)
return false;
}
// perform TGID route rewrites if configured
routeRewrite(buffer, peerId, messageType, dstId, false);
dstId = __GET_UINT16(buffer, 8U);

@ -85,6 +85,8 @@ bool TagP25Data::processFrame(const uint8_t* data, uint32_t len, uint32_t peerId
FrameType::E frameType = FrameType::DATA_UNIT;
if (duid == DUID::PDU) {
if (m_network->m_disablePacketData)
return false;
return m_packetData->processFrame(data, len, peerId, pktSeq, streamId, external);
}

Loading…
Cancel
Save

Powered by TurnKey Linux.