secubox-openwrt/package/secubox/netifyd/patches/001-fix-inline-static-maps.patch
CyberMind-FR 8fcd34abd0 feat: Netifyd Integration & Build System Improvements (v0.9.1)
Major updates:
- Replace luci-app-netifyd-dashboard with enhanced luci-app-secubox-netifyd
- Add netifyd 5.2.1 package with GCC 13.3/C++17 build fixes
- Fix nd-risks.cpp compilation errors via inline static maps patch
- Enhance local-build.sh with improved package building workflow
- Update secubox-core scripts version to v0.9.1

New Features:
- Complete netifyd dashboard with flows, devices, applications, and settings
- Local data collection with netifyd-collector
- Automated cron-based data aggregation
- RPCd integration for real-time statistics

Build Fixes:
- Patch 001: Fix C++17 inline static maps in nd-risks.hpp and nd-protos.hpp
- Patch 003: Skip ndpi tests to resolve roaring_v2 dependency issues
- Add libatomic dependency
- Include libnetifyd shared libraries in package

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-05 17:35:11 +01:00

50 lines
1.8 KiB
Diff

--- a/include/nd-risks.hpp
+++ b/include/nd-risks.hpp
@@ -97,7 +97,7 @@ enum class Id : uint32_t {
TODO = 0xffffffff
};
-const std::unordered_map<Id, const char *, ndEnumHasher> Tags = {
+inline const std::unordered_map<Id, const char *, ndEnumHasher> Tags = {
{ Id::NONE, "None" },
{ Id::ANONYMOUS_SUBSCRIBER, "Anonymous Subscriber" },
@@ -174,7 +174,7 @@ inline Id GetId(const std::string &name
namespace nDPI {
-const std::unordered_map<uint16_t, Id> Risks = {
+inline const std::unordered_map<uint16_t, Id> Risks = {
{ NDPI_ANONYMOUS_SUBSCRIBER, Id::ANONYMOUS_SUBSCRIBER },
{ NDPI_BINARY_APPLICATION_TRANSFER, Id::BINARY_APPLICATION_TRANSFER },
{ NDPI_BINARY_DATA_TRANSFER, Id::BINARY_DATA_TRANSFER },
--- a/include/nd-protos.hpp
+++ b/include/nd-protos.hpp
@@ -469,7 +469,7 @@ enum class Id : uint16_t {
CUSTOM_1024 = 1024,
};
-const std::unordered_map<Id, const char *, ndEnumHasher> Tags = {
+inline const std::unordered_map<Id, const char *, ndEnumHasher> Tags = {
{ Id::AFP, "AFP" },
{ Id::AJP, "AJP" },
{ Id::ALICLOUD, "Alibaba/Cloud" },
@@ -773,7 +773,7 @@ const std::unordered_map<Id, const char
{ Id::ZOOM, "Zoom" },
};
-const std::unordered_map<Id, const char *, ndEnumHasher> Twins = {
+inline const std::unordered_map<Id, const char *, ndEnumHasher> Twins = {
{ Id::APPLE_PUSH, "netify.apple-push" },
{ Id::AVAST, "netify.avast" },
{ Id::BITCOIN, "netify.bitcoin" },
@@ -819,7 +819,7 @@ const std::unordered_map<Id, const char
{ Id::ZOOM, "netify.zoom" },
}
-const std::unordered_map<Id, std::vector<std::pair<uint16_t, Id>>, ndEnumHasher> PortMap = {
+inline const std::unordered_map<Id, std::vector<std::pair<uint16_t, Id>>, ndEnumHasher> PortMap = {
{ Id::TLS,
{
{ 53, Id::DOT },