Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,26 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### [2.2.0](https://github.com/rdkcentral/utopia/compare/2.1.0...2.2.0)

- RDKB-62810,RDKB-62812:Initialize the default variables for Virtual Voice Interface creation [`#171`](https://github.com/rdkcentral/utopia/pull/171)
- RDKB-63137 RDKB-63214: Fetch defaultFile based on Devicemode for Onestack [`#220`](https://github.com/rdkcentral/utopia/pull/220)
- RDKB-60656 : Available memory check for firmware downloads [`#182`](https://github.com/rdkcentral/utopia/pull/182)
- RDKB-62977 RDKB-63450: Native build for Coverity - Updating README.md [`#213`](https://github.com/rdkcentral/utopia/pull/213)
- RDKB-63378 : Set the stackmode for single build [`#206`](https://github.com/rdkcentral/utopia/pull/206)
- RDKB-62977 RDKB-63450: Native build for Coverity - Use Git Submodule [`#207`](https://github.com/rdkcentral/utopia/pull/207)
- Merge tag '2.1.0' into develop [`362d0d3`](https://github.com/rdkcentral/utopia/commit/362d0d3453af6dfe8e1cb2d08e99c946ac0dc638)
Comment on lines +7 to +15
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

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

The PR description focuses on RIPv2 enable/mode restriction for XB10/Single build, but this change set also includes substantial unrelated updates (MAP-E firewall/NAT logic, self-heal cron job scheduling, voice syscfg mapping, pmon/dhcp_server monitoring changes, defaults files, and changelog bump). Please either scope this PR down or update the description (and risk/testing section) to cover these additional behavioral changes.

Copilot uses AI. Check for mistakes.

#### [2.1.0](https://github.com/rdkcentral/utopia/compare/2.0.1...2.1.0)

> 4 February 2026

- RDKB-62660: Fix pausing device option from Xfinity app is not working [`#199`](https://github.com/rdkcentral/utopia/pull/199)
- RDKB-62977 RDKB-62978: Native Build for Coverity - Updating Code [`#194`](https://github.com/rdkcentral/utopia/pull/194)
- XF10-123 : Add script in cron job [`#187`](https://github.com/rdkcentral/utopia/pull/187)
- XF10-286: Enable missing features in Firewall for XF10 [`#138`](https://github.com/rdkcentral/utopia/pull/138)
- RDKB-62977 RDKB-62978: Native Build for Coverity [`#163`](https://github.com/rdkcentral/utopia/pull/163)
- Add changelog for release 2.1.0 [`f131a56`](https://github.com/rdkcentral/utopia/commit/f131a56ad78c6a9afacb17806ad17ed72a317165)
- Merge tag '2.0.1' into develop [`af08995`](https://github.com/rdkcentral/utopia/commit/af0899501306757b966f203f6f4452fde7054551)

#### [2.0.1](https://github.com/rdkcentral/utopia/compare/2.0.0...2.0.1)
Expand Down
178 changes: 143 additions & 35 deletions source/firewall/firewall.c

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions source/firewall/firewall.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ extern BOOL isMAPTReady;
#endif // NAT46_KERNEL_SUPPORT
#endif

#define MAPE_TUNNEL_INTERFACE "ip6tnl"
extern BOOL isMAPEReady;

/* HUB4 application specific defines. */
#ifdef _HUB4_PRODUCT_REQ_
#ifdef HUB4_BFD_FEATURE_ENABLED
Expand Down Expand Up @@ -495,6 +498,11 @@ void do_container_allow(FILE *pFilter, FILE *pMangle, FILE *pNat, int family);
*/
int do_mapt_rules_v6(FILE *filter_fp);

#ifdef FEATURE_MAPE
//MAPE related function
int prepare_mape_rules(FILE *mangle_fp);
#endif

// HUB4 specific functions
#ifdef _HUB4_PRODUCT_REQ_
/**
Expand Down
24 changes: 20 additions & 4 deletions source/firewall/firewall_ipv6.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* If not stated otherwise in this file or this component's Licenses.txt file the

Check failure on line 2 in source/firewall/firewall_ipv6.c

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'BSD-Intel' license found in local file 'source/firewall/firewall_ipv6.c' (Match: rdkb/components/opensource/ccsp/Utopia/rdkb/components/opensource/ccsp/Utopia/1, 2459 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdkb/components/opensource/ccsp/Utopia/+archive/RDKB-TEST-RELEASE-1.tar.gz, file: source/firewall/firewall.c)

Check failure on line 2 in source/firewall/firewall_ipv6.c

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'BSD-Intel' license found in local file 'source/firewall/firewall_ipv6.c' (Match: rdkb/components/opensource/ccsp/Utopia/rdkb/components/opensource/ccsp/Utopia/1, 2459 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdkb/components/opensource/ccsp/Utopia/+archive/RDKB-RELEASE-TEST-DUNFELL-1.tar.gz, file: source/firewall/firewall.c)
* following copyright and licenses apply:
*
* Copyright 2015 RDK Management
Expand Down Expand Up @@ -1240,6 +1240,12 @@
// Basic RPF check on the egress & ingress traffic
char prefix[129];
prefix[0] = 0;
#ifdef FEATURE_MAPE
char prev_prefix[MAX_QUERY] = {0};

sysevent_get(sysevent_fd, sysevent_token, "previous_ipv6_prefix", prev_prefix, sizeof(prev_prefix));
#endif

#ifdef WAN_FAILOVER_SUPPORTED
if (0 == checkIfULAEnabled())
{
Expand All @@ -1252,6 +1258,12 @@
#else
sysevent_get(sysevent_fd, sysevent_token, "ipv6_prefix", prefix, sizeof(prefix));
#endif
#ifdef FEATURE_MAPE
if (prev_prefix[0] != '\0' && prefix[0] != '\0' && strcmp(prev_prefix, prefix) != 0)
{
fprintf(fp, "-A FORWARD -i brlan0 -o erouter0 -s %s -j REJECT --reject-with icmp6-policy-fail\n", prev_prefix);
}
#endif
if ( '\0' != prefix[0] ) {
//fprintf(fp, "-A FORWARD ! -s %s -i %s -m limit --limit 10/sec -j LOG --log-level %d --log-prefix \"UTOPIA: FW. IPv6 FORWARD anti-spoofing\"\n", prefix, lan_ifname,syslog_level);
//fprintf(fp, "-A FORWARD ! -s %s -i %s -m limit --limit 10/sec -j REJECT --reject-with icmp6-adm-prohibited\n", prefix, lan_ifname);
Expand Down Expand Up @@ -1736,10 +1748,11 @@
*/

fprintf(fp, "-A INPUT -i %s -j ACCEPT\n", iface_name);
fprintf(fp, "-A FORWARD -i %s -o %s -j ACCEPT\n", iface_name, current_wan_ifname);
fprintf(fp, "-A FORWARD -i %s -o %s -j ACCEPT\n", iface_name, ecm_wan_ifname);
fprintf(fp, "-A FORWARD -i %s -o %s -j ACCEPT\n", current_wan_ifname, iface_name);
fprintf(fp, "-A FORWARD -i %s -o %s -j ACCEPT\n", ecm_wan_ifname, iface_name);
fprintf(fp, "-A FORWARD -i %s -o %s -j ACCEPT\n", iface_name, isMAPEReady?MAPE_TUNNEL_INTERFACE:current_wan_ifname);
fprintf(fp, "-A FORWARD -i %s -o %s -j ACCEPT\n", iface_name, ecm_wan_ifname);
fprintf(fp, "-A FORWARD -i %s -o %s -j ACCEPT\n", isMAPEReady?MAPE_TUNNEL_INTERFACE:current_wan_ifname, iface_name);
fprintf(fp, "-A FORWARD -i %s -o %s -j ACCEPT\n", ecm_wan_ifname, iface_name);

}

} while ((p = strtok(NULL, " ")) != NULL);
Expand Down Expand Up @@ -2014,6 +2027,9 @@
prepare_dscp_rules_to_prioritized_clnt(fp);
prepare_dscp_rule_for_host_mngt_traffic(fp);
prepare_xconf_rules(fp);
#ifdef FEATURE_MAPE
prepare_mape_rules(fp);
#endif
#endif

#ifdef _COSA_INTEL_XB3_ARM_
Expand Down
4 changes: 1 addition & 3 deletions source/pmon/pmon.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* If not stated otherwise in this file or this component's Licenses.txt file the

Check failure on line 2 in source/pmon/pmon.c

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'BSD-Intel' license found in local file 'source/pmon/pmon.c' (Match: rdkb/components/opensource/ccsp/Utopia/rdkb/components/opensource/ccsp/Utopia/1, 220 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdkb/components/opensource/ccsp/Utopia/+archive/RDKB-RELEASE-TEST-DUNFELL-1.tar.gz, file: source/pmon/pmon.c)
* following copyright and licenses apply:
*
* Copyright 2015 RDK Management
Expand Down Expand Up @@ -178,13 +178,11 @@
return 0;
}
v_secure_system("echo ' RDKB_PROCESS_CRASHED : %s is not running, need restart ' >> /rdklogs/logs/SelfHeal.txt.0 ",proc_name);
//dnsmasq selfheal mechanism is in Aggresive Selfheal for DHCP Manager
#if !defined (FEATURE_RDKB_DHCP_MANAGER)

if(!strcmp(proc_name,"dnsmasq")) {
t2_event_d("SYS_SH_dnsmasq_restart",1);
}
#endif

printf("pmon: attempting to restart '%s' using '%s'\n", proc_name, cmd);
if (pid_file) {
printf("pmon: removing pid file %s\n", pid_file);
Expand Down
7 changes: 0 additions & 7 deletions source/scripts/init/c_registration/15_dhcp_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,7 @@ const char* SERVICE_CUSTOM_EVENTS[] = {

void srv_register(void) {
sm_register(SERVICE_NAME, SERVICE_DEFAULT_HANDLER, SERVICE_CUSTOM_EVENTS);

//dnsmasq selfheal mechanism is in Aggresive Selfheal for DHCP Manager
#if !defined (FEATURE_RDKB_DHCP_MANAGER)
v_secure_system("/etc/utopia/service.d/pmon.sh register dhcp_server");
#endif
}

#ifdef RDKB_EXTENDER_ENABLED
Expand Down Expand Up @@ -153,10 +149,7 @@ void stop_service()

void srv_unregister(void) {

//dnsmasq selfheal mechanism is in Aggresive Selfheal for DHCP Manager
#if !defined (FEATURE_RDKB_DHCP_MANAGER)
v_secure_system("/etc/utopia/service.d/pmon.sh unregister dhcp_server");
#endif

#ifdef RDKB_EXTENDER_ENABLED
stop_service();
Expand Down
4 changes: 4 additions & 0 deletions source/scripts/init/defaults/system_defaults_arm
Original file line number Diff line number Diff line change
Expand Up @@ -1497,3 +1497,7 @@ $FwDwld_AvlMem_RsrvThreshold=20
#FwDwld_ImageProcMemPercent Default value
$FwDwld_ImageProcMemPercent=0

#SelfHeal Cron - RFC flag is enabled by default
$SelfHealCronEnable=true
#STAGE Default value
$StageEnabled=false
5 changes: 5 additions & 0 deletions source/scripts/init/defaults/system_defaults_bci
Original file line number Diff line number Diff line change
Expand Up @@ -1346,3 +1346,8 @@ $FwDwld_AvlMem_RsrvThreshold=20

#FwDwld_ImageProcMemPercent Default value
$FwDwld_ImageProcMemPercent=0

#SelfHeal Cron - RFC flag is enabled by default
$SelfHealCronEnable=true
#STAGE Default value
$StageEnabled=false
5 changes: 5 additions & 0 deletions source/scripts/init/defaults/system_defaults_xd4
Original file line number Diff line number Diff line change
Expand Up @@ -1440,3 +1440,8 @@ $LatencyMeasure_TCPReportInterval=15
$RemoteDebuggerEnabled=false
$RemoteDebuggerIssueType=NULL

#FwDwld_AvlMem_RsrvThreshold Default value
$FwDwld_AvlMem_RsrvThreshold=20

#FwDwld_ImageProcMemPercent Default value
$FwDwld_ImageProcMemPercent=0
35 changes: 33 additions & 2 deletions source/scripts/init/service.d/service_crond.sh
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,44 @@ service_start ()
# Don't Zero iptable Counter
echo "58 * * * * /usr/bin/GenFWLog -nz" >> $CRONTAB_FILE

# Monitor syscfg DB every 15minutes
echo "*/15 * * * * /usr/ccsp/tad/syscfg_recover.sh" >> $CRONTAB_FILE
SELFHEAL_CRON_ENABLE=$(syscfg get SelfHealCronEnable)
SELFHEAL_ENABLE=$(syscfg get selfheal_enable)
if [ "$SELFHEAL_CRON_ENABLE" = "true" ] && [ "$SELFHEAL_ENABLE" = "true" ]; then
echo_t "SelfHeal Cron is enabled"
# Monitor selfheal_aggressive.sh based on syscfg value
AGGRESSIVE_INTERVAL=$(syscfg get AggressiveInterval)
if [ -z "$AGGRESSIVE_INTERVAL" ]; then
AGGRESSIVE_INTERVAL=5
fi
#Write cron rule
echo "*/$AGGRESSIVE_INTERVAL * * * * /usr/ccsp/tad/selfheal_aggressive.sh" >> $CRONTAB_FILE

# Monitor resource_monitor.sh based on syscfg value
RESOURCE_MONITOR_INTERVAL=$(syscfg get resource_monitor_interval)
if [ -z "$RESOURCE_MONITOR_INTERVAL" ]; then
RESOURCE_MONITOR_INTERVAL=15
fi
echo "*/$RESOURCE_MONITOR_INTERVAL * * * * /usr/ccsp/tad/resource_monitor.sh" >> $CRONTAB_FILE

# Monitor self_heal_connectivity_test.sh based on syscfg value
SELFHEAL_PING_INTERVAL=$(syscfg get ConnTest_PingInterval)
if [ -z "$SELFHEAL_PING_INTERVAL" ]; then
SELFHEAL_PING_INTERVAL=60
fi
echo "*/$SELFHEAL_PING_INTERVAL * * * * /usr/ccsp/tad/self_heal_connectivity_test.sh" >> $CRONTAB_FILE
Comment on lines +175 to +194
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

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

The values from syscfg (AggressiveInterval, resource_monitor_interval, ConnTest_PingInterval) are written directly into the crontab line via echo "*/$AGGRESSIVE_INTERVAL * * * * ..." without any sanitization. If an attacker can influence these syscfg keys (e.g., via config or management interfaces), they could inject newlines or non-numeric content to create arbitrary cron entries and achieve command execution as root. Ensure these intervals are strictly validated as numeric (e.g., only digits within an expected range) before using them in the cron expression, or otherwise sanitize/escape them before writing to $CRONTAB_FILE.

Copilot uses AI. Check for mistakes.
echo_t "Selfheal cron jobs are started"

else
echo_t "Selfheal cron is disabled"
# Monitor syscfg DB every 15minutes
echo "*/15 * * * * /usr/ccsp/tad/syscfg_recover.sh" >> $CRONTAB_FILE

# Monitor resource_monitor.sh every 5 minutes TCCBR-3288
# if [ "$BOX_TYPE" = "TCCBR" ]; then
echo "*/5 * * * * /usr/ccsp/tad/resource_monitor_recover.sh" >> $CRONTAB_FILE
# fi

fi

# RDKB-23651
if [ "$THERMALCTRL_ENABLE" = "true" ]; then
Expand Down
5 changes: 4 additions & 1 deletion source/scripts/init/service.d/service_routed.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh

Check failure on line 1 in source/scripts/init/service.d/service_routed.sh

View workflow job for this annotation

GitHub Actions / call-fossid-workflow / Fossid Annotate PR

FossID License Issue Detected

Source code with 'BSD-Intel' license found in local file 'source/scripts/init/service.d/service_routed.sh' (Match: rdkb/components/opensource/ccsp/Utopia/rdkb/components/opensource/ccsp/Utopia/1, 98 lines, url: https://code.rdkcentral.com/r/plugins/gitiles/rdkb/components/opensource/ccsp/Utopia/+archive/RDKB-RELEASE-TEST-DUNFELL-1.tar.gz, file: source/scripts/init/service.d/service_routed.sh)
##########################################################################
# If not stated otherwise in this file or this component's Licenses.txt
# file the following copyright and licenses apply:
Expand Down Expand Up @@ -67,7 +67,10 @@
lan-status)
status=$(sysevent get lan-status)
if [ "$status" == "started" ]; then
service_routed start
service_routed start
if [ "$BOX_TYPE" == "WNXL11BWL" ]; then
service_routed radv-start
fi
elif [ "$status" == "stopped" ]; then
# As per Sky requirement, radvd should run with ULA prefix though the wan-status is down
if [ "$BOX_TYPE" != "HUB4" ] && [ "$BOX_TYPE" != "SR300" ] && [ "$BOX_TYPE" != "SE501" ] && [ "$BOX_TYPE" != "SR213" ] && [ "$BOX_TYPE" != "WNXL11BWL" ] && [ "$LANULASupport" != "true" ]; then
Expand Down
Loading
Loading