Skip to content

RDKB-64184, RDKB-64546 : RFC implementation and NI CPU, Memory monitoring for CUJO 26.1 release#80

Merged
apattu200 merged 35 commits into
developfrom
feature/RDKB-64184
May 27, 2026
Merged

RDKB-64184, RDKB-64546 : RFC implementation and NI CPU, Memory monitoring for CUJO 26.1 release#80
apattu200 merged 35 commits into
developfrom
feature/RDKB-64184

Conversation

@SanthoshGujulvajagadeesh
Copy link
Copy Markdown
Contributor

@SanthoshGujulvajagadeesh SanthoshGujulvajagadeesh commented May 27, 2026

Reason for change:
Implemented RFCs,

  • Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.NetworkIntelligence.Enable
  • Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.NetworkIntelligence.MemoryLimit
  • Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.AdvSecDNSECHBlocking.Enable
  • Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.AdvSecDoHBlocking.Enable

Implemented CPU and Memory monitoring for cujo-qosd process.
Shell script refactoring

Test Procedure:

  1. Cujo Agent process should work as designed.
  2. If Network Intelligence RFC is enabled, cujo-qosd process should work as designed.

Risks: Low
Priority: P1

Signed-off-by: Santhosh_GujulvaJagadeesh@comcast.com

SanthoshGujulvajagadeesh and others added 30 commits April 20, 2026 10:50
…nd memory monitoring (#53)

Reason for change: Add network intelligence (NI) support, WDA fix and NI
CPU and memory monitoring

Test Procedure:
1) advsec agent and network intelligence process should work as
designed.

Risks: Low
Priority: P1

Signed-off-by: Santhosh_GujulvaJagadeesh@comcast.com
…cujo-ni.service not loaded. (#54)

Reason for change: Added platform check to stop cujo-ni service only on
XB8 where NI feature is supported to avoid service control errors on
other platforms.
Test Procedure: Flashed image, checked console logs and confirmed no
"cujo-ni.service not loaded" error.
Risks: Low
Priority: P1
Signed-off-by: Sowmiya_Chelliah@comcast.com
Copilot AI review requested due to automatic review settings May 27, 2026 06:34
@SanthoshGujulvajagadeesh SanthoshGujulvajagadeesh requested review from a team as code owners May 27, 2026 06:34
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds Network Intelligence and DNS blocking RFC support to Advanced Security, including TR-181 exposure, DML handlers, startup scripting, and CPU/memory/log monitoring updates.

Changes:

  • Adds new RFC data model objects and DML registration/handlers for Network Intelligence, DoH blocking, and DNS ECH blocking.
  • Adds Network Intelligence startup/shutdown handling and CPU/memory recovery logic.
  • Refactors supporting scripts and hardens several existing C helpers and tests.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
configure.ac Adds --enable-networkintel build option.
config/TR181-AdvSecurity.xml Adds TR-181 objects for NI, DoH blocking, and DNS ECH blocking.
source/AdvSecurityDml/Makefile.am Adds NI build flags and libev/pthread linkage.
source/AdvSecurityDml/plugin_main.c Registers new RFC DML callbacks.
source/AdvSecurityDml/cosa_adv_security_internal.h Adds NI/DoH/DNS ECH structs and declarations.
source/AdvSecurityDml/cosa_adv_security_internal.c Adds NI init/deinit, log monitoring, syscfg hardening, and cleanup fixes.
source/AdvSecurityDml/cosa_adv_security_dml.h Declares new RFC DML APIs.
source/AdvSecurityDml/cosa_adv_security_dml.c Implements new RFC get/set handlers and related guard logic.
source/AdvSecurityDml/cujoagent_dcl_api.h Updates CUJO socket/group constants.
source/AdvSecurityDml/cujoagent_dcl_api.c Reworks CUJO socket directory creation and ownership setup.
source/AdvSecurityDml/cosa_adv_security_webconfig.c Improves version parsing and frees blob data on error.
scripts/advsec.sh Adds NI/DoH/DNS ECH environment, telemetry, and script refactors.
scripts/start_adv_security.sh Adds enable/disable paths for NI, DoH blocking, and DNS ECH blocking.
scripts/advsec_log_fp_status.sh Logs status telemetry for new RFCs and restricts command dispatch.
scripts/advsec_cpu_mem_recovery.sh Adds NI memory/CPU monitoring and refactors CPU/memory collection.
source/test/CcspAdvSecurityDmlTest/Makefile.am Links libev for tests.
source/test/CcspAdvSecurityDmlTest/CcspAdvSecurityDmlTest.cpp Adds tests for HTTP endpoint rejection and NI memory limit APIs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

gtest_main.cpp

CcspAdvSecurityDmlTest_gtest_bin_LDFLAGS = -lgtest -lgmock -lgcov -pthread
CcspAdvSecurityDmlTest_gtest_bin_LDFLAGS = -lgtest -lgmock -lgcov -pthread -lev
MAX_MEM_HARD_LIMIT=$max_rss
fi

NI_ENABLE=$(dmcli eRT retv Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.NetworkIntelligence.Enable)
Comment on lines +159 to +162
if [ ${ni_rss} -eq 0 ]; then
ni_rss=$rss
ni_pss=$pss
fi
apattu200
apattu200 previously approved these changes May 27, 2026
Copilot AI review requested due to automatic review settings May 27, 2026 10:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 18 out of 18 changed files in this pull request and generated 4 comments.

Comment thread scripts/start_adv_security.sh Outdated
Comment on lines 185 to 189
ipt4=$(grep -c CUJO /tmp/.ipt)
ipt6=$(grep -c CUJO /tmp/.ipt_v6)
ip4=$(iptables-save | grep -c CUJO)
ip6=$(ip6tables-save | grep -c CUJO)
if [ ${ipt4} != ${ip4} ] || [ ${ipt6} != ${ip6} ]; then
Comment on lines +159 to +162
if [ ${ni_rss} -eq 0 ]; then
ni_rss=$rss
ni_pss=$pss
fi
g_pAdvSecAgent->pAdvNetworkIntelligence_RFC = (COSA_DATAMODEL_ADVSECNETWORKINTELLIGENCE_RFC *)malloc(sizeof(COSA_DATAMODEL_ADVSECNETWORKINTELLIGENCE_RFC));
ASSERT_NE(g_pAdvSecAgent->pAdvNetworkIntelligence_RFC, nullptr);

g_pAdvSecAgent->pAdvNetworkIntelligence_RFC->uMemoryLimit = 100;
Comment on lines +710 to 733
X_RDKCENTRAL-COM_RFC.Feature.AdvSecDNSECHBlocking.

* AdvSecDNSECHBlocking_RFC_GetParamBoolValue
* AdvSecDNSECHBlocking_RFC_SetParamBoolValue

***********************************************************************/
BOOL
AdvSecDNSECHBlocking_RFC_GetParamBoolValue
(
ANSC_HANDLE hInsContext,
char* ParamName,
BOOL* pBool
);
BOOL
AdvSecDNSECHBlocking_RFC_SetParamBoolValue
(
ANSC_HANDLE hInsContext,
char* ParamName,
BOOL bValue
);
/***********************************************************************

APIs for Object:

@apattu200 apattu200 merged commit 6ad300a into develop May 27, 2026
10 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators May 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants