From 44b7980a95107a564670393e4a2450e953223436 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Tue, 26 May 2026 23:18:29 +0200 Subject: ipcpd: Fully gate fa/dt RIB ops on IPCP_FLOW_STATS The previous shape registered no-op _rib_read / _rib_readdir / _rib_getattr handlers when IPCP_FLOW_STATS was off, and there was a bug where *buf was not set in the no-op causing free on an uninitialized pointer. IPCP_FLOW_STATS was referenced by config.h.in but the declaration was lost during the CMake refactor. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- cmake/config/ipcp/common.cmake | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'cmake') diff --git a/cmake/config/ipcp/common.cmake b/cmake/config/ipcp/common.cmake index 0c873b76..7dbc252b 100644 --- a/cmake/config/ipcp/common.cmake +++ b/cmake/config/ipcp/common.cmake @@ -42,9 +42,14 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") "Slack value for high resolution timers on Linux systems.") endif() -# ipcpd-eth flow statistics (requires FUSE - eth.c relies on -# IPCP_ETH_FLOW_STATS implying HAVE_FUSE for rib_reg/rib_unreg) +# Per-flow statistics exposed via the RIB (requires FUSE). if(HAVE_FUSE) + set(IPCP_FLOW_STATS TRUE CACHE BOOL + "Enable per-flow statistics via the RIB") + if(IPCP_FLOW_STATS) + message(STATUS "IPCP flow statistics enabled") + endif() + set(IPCP_ETH_FLOW_STATS FALSE CACHE BOOL "Enable ipcpd-eth flow statistics via RIB") if(IPCP_ETH_FLOW_STATS) -- cgit v1.2.3