Skip to content
5 changes: 5 additions & 0 deletions source/firewall/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,8 @@ nfq_handler_LDADD = $(top_builddir)/source/syscfg/lib/libsyscfg.la \
if CORE_NET_LIB_FEATURE_SUPPORT
AM_LDFLAGS += -lnet
endif

if ONESTACK_PRODUCT_REQ
AM_LDFLAGS += -ldevicemode -lrdkb_feature_mode_gate
endif

3 changes: 2 additions & 1 deletion source/firewall/firewall.h
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,8 @@ int prepare_multinet_filter_output_v6(FILE *fp);
*/
int prepare_ipv6_rule_ex_mode(FILE *raw_fp, FILE *mangle_fp, FILE *nat_fp, FILE *filter_fp);
#endif
#if defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) && !defined(_CBR_PRODUCT_REQ_)
#if (defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) && !defined(_CBR_PRODUCT_REQ_)) \
|| defined(_ONESTACK_PRODUCT_REQ_)
/**
* @brief Prepare IPv6 MultiNet rules with DHCPv6 prefix delegation support.
*
Expand Down
25 changes: 21 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, 2476 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, 2476 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 @@ -98,6 +98,9 @@
#include <net/if.h>
#endif

#ifdef _ONESTACK_PRODUCT_REQ_
#include <rdkb_feature_mode_gate.h>
#endif
void* bus_handle ;
int sysevent_fd;
char sysevent_ip[19];
Expand Down Expand Up @@ -862,11 +865,17 @@
}
#endif /*_HUB4_PRODUCT_REQ_*/

#if defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) && ! defined(_CBR_PRODUCT_REQ_)
#if (defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) && !defined(_CBR_PRODUCT_REQ_)) || defined(_ONESTACK_PRODUCT_REQ_)
#if defined(_ONESTACK_PRODUCT_REQ_)
if ( isFeatureSupportedInCurrentMode(FEATURE_IPV6_DELEGATION) == true)
#endif
{

/*Add a simple logic here to make traffic allowed for lan interfaces
* exclude primary lan*/
prepare_ipv6_multinet(fp);
#endif
}
#endif
#if !defined(_XER5_PRODUCT_REQ_) && !defined (_SCER11BEL_PRODUCT_REQ_) && !defined(_COSA_QCA_ARM_) //wan0 is not applicable for XER5
/* not allow ping wan0 from brlan0 */
int i;
Expand Down Expand Up @@ -1717,9 +1726,17 @@
FIREWALL_DEBUG("Exiting prepare_ipv6_firewall \n");
}

#if defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) && ! defined(_CBR_PRODUCT_REQ_)
static int prepare_ipv6_multinet(FILE *fp)
#if (defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) && !defined(_CBR_PRODUCT_REQ_)) \
|| defined(_ONESTACK_PRODUCT_REQ_)
int prepare_ipv6_multinet(FILE *fp)
{
#ifdef _ONESTACK_PRODUCT_REQ_
if (!isFeatureSupportedInCurrentMode(FEATURE_IPV6_DELEGATION))
{
/* PD feature disabled */
return 0;
}
#endif
char active_insts[32] = {0};
char lan_pd_if[128] = {0};
char *p = NULL;
Expand Down
2 changes: 1 addition & 1 deletion source/scripts/init/c_registration/15_dhcpv6_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const char* SERVICE_CUSTOM_EVENTS[] = {
"lan-status|/usr/bin/service_dhcpv6_client",
NULL
};
#elif defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION)
#elif defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(_ONESTACK_PRODUCT_REQ_)
const char* SERVICE_CUSTOM_EVENTS[] = {
"erouter_mode-updated|/etc/utopia/service.d/service_dhcpv6_client.sh",
"phylink_wan_state|/etc/utopia/service.d/service_dhcpv6_client.sh",
Expand Down
39 changes: 38 additions & 1 deletion source/scripts/init/c_registration/15_dhcpv6_server.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/scripts/init/c_registration/15_dhcpv6_server.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/scripts/init/c_registration/15_dhcpv6_server.c' (Match: rdkb/components/opensource/ccsp/Utopia/rdkb/components/opensource/ccsp/Utopia/1, 130 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/c_registration/02_bridge.c)

Check failure on line 2 in source/scripts/init/c_registration/15_dhcpv6_server.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/scripts/init/c_registration/15_dhcpv6_server.c' (Match: rdkb/components/opensource/ccsp/Utopia/rdkb/components/opensource/ccsp/Utopia/1, 130 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/c_registration/15_dhcpv6_server.c)
* following copyright and licenses apply:
*
* Copyright 2015 RDK Management
Expand Down Expand Up @@ -35,10 +35,17 @@

#include <stdio.h>
#include "srvmgr.h"
#ifdef _ONESTACK_PRODUCT_REQ_
#include <rdkb_feature_mode_gate.h>
#endif

const char* SERVICE_NAME = "dhcpv6_server";
const char* SERVICE_DEFAULT_HANDLER = "/etc/utopia/service.d/service_dhcpv6_server.sh";

#if defined(_ONESTACK_PRODUCT_REQ_)
const char** SERVICE_CUSTOM_EVENTS = NULL;
#endif
Comment on lines +45 to +47
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

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

For OneStack, SERVICE_CUSTOM_EVENTS is declared as a pointer (const char**), but the file can also define a const char* SERVICE_CUSTOM_EVENTS[] array in other preprocessor branches. If _ONESTACK_PRODUCT_REQ_ is ever combined with those branches, this will be a symbol redefinition compile error. Please adjust the preprocessor logic or rename the OneStack variable so SERVICE_CUSTOM_EVENTS is defined exactly once per build.

Copilot uses AI. Check for mistakes.

#if defined(_CBR_PRODUCT_REQ_) && !defined(_CBR2_PRODUCT_REQ_)
const char* SERVICE_CUSTOM_EVENTS[] = {
Comment on lines +45 to 50
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

This introduces the same potential symbol clash as in 20_routing.c: if _ONESTACK_PRODUCT_REQ_ is defined alongside another branch that defines SERVICE_CUSTOM_EVENTS[], compilation will fail due to redefinition. Prefer a single compile-time selection that declares SERVICE_CUSTOM_EVENTS once, and use a const-correct pointer type (const char* const *) when you need to re-point it at different static arrays.

Copilot uses AI. Check for mistakes.
"dhcpv6_option_changed|/usr/bin/service_ipv6",
Expand All @@ -47,11 +54,28 @@
"dhcpv6_server-restart|/usr/bin/service_ipv6",
NULL
};
#elif defined (CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION)
#elif defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION)
const char* SERVICE_CUSTOM_EVENTS[] = {
"dhcpv6_option_changed|/etc/utopia/service.d/service_dhcpv6_server.sh|NULL|"TUPLE_FLAG_EVENT,
NULL
Comment on lines 45 to 60
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

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

Same issue as in 20_routing.c: _ONESTACK_PRODUCT_REQ_ adds a const char** SERVICE_CUSTOM_EVENTS declaration, but the CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION branch defines const char* SERVICE_CUSTOM_EVENTS[]. If both macros are defined this will not compile due to redefinition/type mismatch. Restructure so there is only one SERVICE_CUSTOM_EVENTS definition in any build configuration (or use distinct names for the pointer vs arrays).

Copilot uses AI. Check for mistakes.
};
#elif defined(_ONESTACK_PRODUCT_REQ_)
const char* SERVICE_CUSTOM_EVENTS_RESIDENTIAL[] = {
"lan-status|/etc/utopia/service.d/service_dhcpv6_server.sh",
"ipv6_nameserver|/etc/utopia/service.d/service_dhcpv6_server.sh",
"ipv6_domain|/etc/utopia/service.d/service_dhcpv6_server.sh",
"ipv6_ntp_server|/etc/utopia/service.d/service_dhcpv6_server.sh",
"dhcp_domain|/etc/utopia/service.d/service_dhcpv6_server.sh",
"current_lan_ipv6address|/etc/utopia/service.d/service_dhcpv6_server.sh",
NULL
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

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

Inconsistent indentation in array. Line 70 uses a tab character while surrounding lines use spaces. This creates visual inconsistency and should be standardized to match the indentation style of the rest of the array.

Suggested change
NULL
NULL

Copilot uses AI. Check for mistakes.
};
const char* SERVICE_CUSTOM_EVENTS_BUSINESS[] = {
"dhcpv6_server-start|/etc/utopia/service.d/service_dhcpv6_server_bci.sh",
"dhcpv6_server-stop|/etc/utopia/service.d/service_dhcpv6_server_bci.sh",
"dhcpv6_server-restart|/etc/utopia/service.d/service_dhcpv6_server_bci.sh",
"ipv6_prefix_delegation|/etc/utopia/service.d/service_dhcpv6_server_bci.sh",
"dhcpv6_option_changed|/etc/utopia/service.d/service_dhcpv6_server_bci.sh|NULL|"TUPLE_FLAG_EVENT,NULL
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

This array initializer is syntactically invalid: the final element combines a string literal and NULL without a separating comma, which will fail compilation. Split the last entry into a string element and a separate NULL terminator (and ensure the TUPLE_FLAG_EVENT concatenation remains part of the string literal).

Suggested change
"dhcpv6_option_changed|/etc/utopia/service.d/service_dhcpv6_server_bci.sh|NULL|"TUPLE_FLAG_EVENT,NULL
"dhcpv6_option_changed|/etc/utopia/service.d/service_dhcpv6_server_bci.sh|NULL|"TUPLE_FLAG_EVENT,
NULL

Copilot uses AI. Check for mistakes.
};
#else
const char* SERVICE_CUSTOM_EVENTS[] = {
"lan-status|/etc/utopia/service.d/service_dhcpv6_server.sh",
Expand All @@ -64,8 +88,21 @@
};
#endif

#if defined(_ONESTACK_PRODUCT_REQ_)
static void init_service_custom_events(void)
{
if (isFeatureSupportedInCurrentMode(FEATURE_IPV6_DELEGATION)) {
SERVICE_CUSTOM_EVENTS = SERVICE_CUSTOM_EVENTS_BUSINESS;
} else {
SERVICE_CUSTOM_EVENTS = SERVICE_CUSTOM_EVENTS_RESIDENTIAL;
}
}
#endif

void srv_register(void) {
#if defined(_ONESTACK_PRODUCT_REQ_)
init_service_custom_events();
#endif
sm_register(SERVICE_NAME, SERVICE_DEFAULT_HANDLER, SERVICE_CUSTOM_EVENTS);
}

Expand Down
50 changes: 48 additions & 2 deletions source/scripts/init/c_registration/20_routing.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/scripts/init/c_registration/20_routing.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/scripts/init/c_registration/20_routing.c' (Match: rdkb/components/opensource/ccsp/Utopia/rdkb/components/opensource/ccsp/Utopia/1, 165 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/c_registration/20_routing.c)
* following copyright and licenses apply:
*
* Copyright 2015 RDK Management
Expand Down Expand Up @@ -40,11 +40,16 @@
#endif
#include "srvmgr.h"
#include "secure_wrapper.h"
#ifdef _ONESTACK_PRODUCT_REQ_
#include <rdkb_feature_mode_gate.h>
#endif

#define SERVICE_NAME "routed"
#define SERVICE_DEFAULT_HANDLER "/etc/utopia/service.d/service_routed.sh"

#ifdef CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION
#if defined(_ONESTACK_PRODUCT_REQ_)
const char** SERVICE_CUSTOM_EVENTS = NULL;
Comment on lines +49 to +50
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

Under configurations where _ONESTACK_PRODUCT_REQ_ and CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION are both defined, this will produce a redefinition of SERVICE_CUSTOM_EVENTS with incompatible types (const char** vs const char* []). Refactor to define SERVICE_CUSTOM_EVENTS exactly once via a single #if / #elif / #else chain, and consider using const char* const *SERVICE_CUSTOM_EVENTS for the pointer form to preserve const-correctness.

Suggested change
#if defined(_ONESTACK_PRODUCT_REQ_)
const char** SERVICE_CUSTOM_EVENTS = NULL;
#if defined(_ONESTACK_PRODUCT_REQ_) && !defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION)
const char* const *SERVICE_CUSTOM_EVENTS = NULL;

Copilot uses AI. Check for mistakes.
#endif
#if defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION)
const char* SERVICE_CUSTOM_EVENTS[] = {
Comment on lines +49 to 53
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

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

OneStack introduces const char** SERVICE_CUSTOM_EVENTS = NULL; but this file also defines const char* SERVICE_CUSTOM_EVENTS[] under CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION. If both macros are enabled, this will not compile (symbol redefinition). Please restructure/guard so only one SERVICE_CUSTOM_EVENTS definition exists for any macro combination.

Copilot uses AI. Check for mistakes.
Comment on lines +49 to 53
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

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

This introduces a duplicate definition of SERVICE_CUSTOM_EVENTS when both _ONESTACK_PRODUCT_REQ_ and CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION are defined (pointer + array with the same identifier), which will fail compilation. Fix by making the OneStack pointer declaration mutually exclusive with the other SERVICE_CUSTOM_EVENTS[] declarations (e.g., fold it into the same #if/#elif/#else chain), or rename the OneStack-selected pointer (e.g., SERVICE_CUSTOM_EVENTS_PTR) and pass that to sm_register().

Copilot uses AI. Check for mistakes.
"wan-status|/etc/utopia/service.d/service_routed.sh",
"lan-status|/etc/utopia/service.d/service_routed.sh",
Expand All @@ -54,6 +59,33 @@
"staticroute-restart|/etc/utopia/service.d/service_routed.sh|NULL|"TUPLE_FLAG_EVENT,
NULL
};
#elif defined(_ONESTACK_PRODUCT_REQ_)
const char* SERVICE_CUSTOM_EVENTS_RESIDENTIAL[] = {
"wan-status|/etc/utopia/service.d/service_routed.sh",
"lan-status|/etc/utopia/service.d/service_routed.sh",
"ipv6_nameserver|/etc/utopia/service.d/service_routed.sh",
"ipv6_prefix|/etc/utopia/service.d/service_routed.sh",
"ripd-restart|/etc/utopia/service.d/service_routed.sh|NULL|"TUPLE_FLAG_EVENT,
"zebra-restart|/etc/utopia/service.d/service_routed.sh|NULL|"TUPLE_FLAG_EVENT,
"staticroute-restart|/etc/utopia/service.d/service_routed.sh|NULL|"TUPLE_FLAG_EVENT,
#ifdef WAN_FAILOVER_SUPPORTED
"routeset-ula|/usr/bin/service_routed|NULL|"TUPLE_FLAG_EVENT,
"routeunset-ula|/usr/bin//service_routed|NULL|"TUPLE_FLAG_EVENT,
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

The routeunset-ula handler path contains a double slash (/usr/bin//service_routed). While it may resolve on many systems, it’s an easy source of inconsistency and can break path comparisons/tools. Use /usr/bin/service_routed.

Copilot uses AI. Check for mistakes.
#endif
NULL
Comment on lines +71 to +75
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

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

Using preprocessor directives inside array initialization is non-standard and could cause compilation issues or unexpected behavior depending on the compiler. If WAN_FAILOVER_SUPPORTED is not defined, this will result in a trailing comma before NULL, which while typically handled by most C compilers, is technically a C99 feature and may not be portable. Consider defining two complete separate arrays or restructuring to avoid conditionals within the array.

Copilot uses AI. Check for mistakes.
};
const char* SERVICE_CUSTOM_EVENTS_BUSINESS[] = {
"wan-status|/etc/utopia/service.d/service_routed_bci.sh",
"lan-status|/etc/utopia/service.d/service_routed_bci.sh",
"dhcpv6_option_changed|/etc/utopia/service.d/service_routed_bci.sh|NULL|"TUPLE_FLAG_EVENT,
"ripd-restart|/etc/utopia/service.d/service_routed_bci.sh|NULL|"TUPLE_FLAG_EVENT,
"zebra-restart|/etc/utopia/service.d/service_routed_bci.sh|NULL|"TUPLE_FLAG_EVENT,
"staticroute-restart|/etc/utopia/service.d/service_routed_bci.sh|NULL|"TUPLE_FLAG_EVENT,
"ipv6_prefix_delegation|/etc/utopia/service.d/service_routed_bci.sh|NULL|"TUPLE_FLAG_EVENT,
NULL
};


#else
const char* SERVICE_CUSTOM_EVENTS[] = {
"wan-status|/etc/utopia/service.d/service_routed.sh",
Expand All @@ -72,7 +104,21 @@

#endif

#if defined(_ONESTACK_PRODUCT_REQ_)
static void init_service_custom_events(void)
{
if (isFeatureSupportedInCurrentMode(FEATURE_IPV6_DELEGATION)) {
SERVICE_CUSTOM_EVENTS = SERVICE_CUSTOM_EVENTS_BUSINESS;
} else {
SERVICE_CUSTOM_EVENTS = SERVICE_CUSTOM_EVENTS_RESIDENTIAL;
}
}
#endif

void srv_register(void) {
#if defined(_ONESTACK_PRODUCT_REQ_)
init_service_custom_events();
#endif
// not sure is the rm is necessary anymore
// system("rm -Rf /etc/iproute2/rt_tables");
DBG_PRINT("20_routing : %s Entry\n", __FUNCTION__);
Expand Down
3 changes: 3 additions & 0 deletions source/scripts/init/c_registration/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,6 @@ endif
if ENABLE_HOTSPOT_SERVICE
15_hotspot_SOURCES = 15_hotspot.c
endif
if ONESTACK_PRODUCT_REQ
LDFLAGS += -lrdkb_feature_mode_gate -ldevicemode
endif
2 changes: 1 addition & 1 deletion source/scripts/init/service.d/service_crond.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ service_start ()
echo "1 */12 * * * /usr/ccsp/tad/FileHandle_Monitor.sh" >> $CRONTAB_FILE


if [ "$MODEL_NUM" = "DPC3941B" ] || [ "$MODEL_NUM" = "DPC3939B" ] || [ "$MODEL_NUM" = "CGA4131COM" ] || [ "$MODEL_NUM" = "CGA4332COM" ]; then
if [ "$MODEL_NUM" = "DPC3941B" ] || [ "$MODEL_NUM" = "DPC3939B" ] || [ "$MODEL_NUM" = "CGA4131COM" ] || [ "$MODEL_NUM" = "CGA4332COM" ] || [ "$MODEL_NUM" = "SG417DBCT" ]; then
echo "*/15 * * * * /usr/ccsp/tad/log_staticIP_client_info.sh" >> $CRONTAB_FILE
fi

Expand Down
12 changes: 7 additions & 5 deletions source/scripts/init/service.d/service_dhcpv6_server_bci.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_dhcpv6_server_bci.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_dhcpv6_server_bci.sh' (Match: rdkb/components/opensource/ccsp/Utopia/rdkb/components/opensource/ccsp/Utopia/1, 304 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_dhcpv6_server_bci.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 @@ -262,21 +262,21 @@

case "$1" in
"${SERVICE_NAME}-start")
if [ "$MODEL_NUM" = "DPC3941B" ] || [ "$MODEL_NUM" = "DPC3939B" ] || [ "$MODEL_NUM" = "CGA4131COM" ] || [ "$MODEL_NUM" = "CGA4332COM" ]; then
if [ "$MODEL_NUM" = "DPC3941B" ] || [ "$MODEL_NUM" = "DPC3939B" ] || [ "$MODEL_NUM" = "CGA4131COM" ] || [ "$MODEL_NUM" = "CGA4332COM" ] || [ "$MODEL_NUM" = "SG417DBCT" ]; then
service_ipv6 start
else
service_ipv6 dhcpv6s-start
fi
;;
"${SERVICE_NAME}-stop")
if [ "$MODEL_NUM" = "DPC3941B" ] || [ "$MODEL_NUM" = "DPC3939B" ] || [ "$MODEL_NUM" = "CGA4131COM" ] || [ "$MODEL_NUM" = "CGA4332COM" ]; then
if [ "$MODEL_NUM" = "DPC3941B" ] || [ "$MODEL_NUM" = "DPC3939B" ] || [ "$MODEL_NUM" = "CGA4131COM" ] || [ "$MODEL_NUM" = "CGA4332COM" ] || [ "$MODEL_NUM" = "SG417DBCT" ]; then
service_ipv6 stop
else
service_ipv6 dhcpv6s-stop
fi
;;
"${SERVICE_NAME}-restart")
if [ "$MODEL_NUM" = "DPC3941B" ] || [ "$MODEL_NUM" = "DPC3939B" ] || [ "$MODEL_NUM" = "CGA4131COM" ] || [ "$MODEL_NUM" = "CGA4332COM" ]; then
if [ "$MODEL_NUM" = "DPC3941B" ] || [ "$MODEL_NUM" = "DPC3939B" ] || [ "$MODEL_NUM" = "CGA4131COM" ] || [ "$MODEL_NUM" = "CGA4332COM" ] || [ "$MODEL_NUM" = "SG417DBCT" ]; then
service_ipv6 restart
else
service_ipv6 dhcpv6s-restart
Expand All @@ -285,11 +285,13 @@
#----------------------------------------------------------------------------------
# Add other event entry points here
#----------------------------------------------------------------------------------

ipv6_prefix_delegation)
service_ipv6 restart
;;
# ipv6_nameserver|ipv6_dnssl)
# service_ipv6 dhcpv6s-restart
dhcpv6_option_changed)
if [ "$MODEL_NUM" = "DPC3941B" ] || [ "$MODEL_NUM" = "DPC3939B" ] || [ "$MODEL_NUM" = "CGA4131COM" ] || [ "$MODEL_NUM" = "CGA4332COM" ]; then
if [ "$MODEL_NUM" = "DPC3941B" ] || [ "$MODEL_NUM" = "DPC3939B" ] || [ "$MODEL_NUM" = "CGA4131COM" ] || [ "$MODEL_NUM" = "CGA4332COM" ] || [ "$MODEL_NUM" = "SG417DBCT" ]; then
service_ipv6 restart
else
service_ipv6 dhcpv6s-restart
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##########################################################################

Check failure on line 1 in source/scripts/init/service.d/service_registration_functions.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_registration_functions.sh' (Match: rdkb/components/opensource/ccsp/Utopia/rdkb/components/opensource/ccsp/Utopia/1, 458 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_registration_functions.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 @@ -306,7 +306,7 @@
if [ "NULL" = "$SMR_EVENT" ] ; then
return 0
fi

echo "[DEBUG] sm_rm_event ${SMR_SERVICE} ${SMR_EVENT_NAME}"
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

These debug echo statements are unconditional and will add noise to boot/service manager logs on all devices. Consider guarding them behind a debug flag/environment variable (or using an existing structured logger like ulog if that’s the convention for this repo).

Suggested change
echo "[DEBUG] sm_rm_event ${SMR_SERVICE} ${SMR_EVENT_NAME}"
ulog srvmgr status "[DEBUG] sm_rm_event ${SMR_SERVICE} ${SMR_EVENT_NAME}"

Copilot uses AI. Check for mistakes.
# if this service has already registered for this event, then cancel the previous registration
# this is probably overkill since we likely already called sm_unregister, but better safe than sorry
sm_rm_event "${SMR_SERVICE}" "${SMR_EVENT_NAME}"
Expand Down Expand Up @@ -445,6 +445,7 @@
IFS=';'
for custom in $SM_CUSTOM_EVENTS ; do
if [ -n "$custom" ] && [ " " != "$custom" ] ; then
echo "[DHCPV6][DEBUG] Registering custom event: '$custom' for service '$SM_SERVICE'"
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

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

These debug echo statements are unconditional and will add noise to boot/service manager logs on all devices. Consider guarding them behind a debug flag/environment variable (or using an existing structured logger like ulog if that’s the convention for this repo).

Suggested change
echo "[DHCPV6][DEBUG] Registering custom event: '$custom' for service '$SM_SERVICE'"
ulog dhcpv6 debug "Registering custom event: '$custom' for service '$SM_SERVICE'"

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

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

Debug echo statements are being added to shell scripts. These should be removed or made conditional before production deployment to avoid cluttering logs and potentially exposing sensitive information.

Suggested change
echo "[DHCPV6][DEBUG] Registering custom event: '$custom' for service '$SM_SERVICE'"

Copilot uses AI. Check for mistakes.
IFS=$SAVEIFS
sm_register_one_event "$SM_SERVICE" "$custom"
IFS=';'
Expand Down
5 changes: 4 additions & 1 deletion source/scripts/init/service.d/service_routed_bci.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_bci.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_bci.sh' (Match: rdkb/components/opensource/ccsp/Utopia/rdkb/components/opensource/ccsp/Utopia/1, 102 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)

Check failure on line 1 in source/scripts/init/service.d/service_routed_bci.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_bci.sh' (Match: rdkb/components/opensource/ccsp/Utopia/rdkb/components/opensource/ccsp/Utopia/1, 102 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_bci.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 @@ -80,11 +80,14 @@
staticroute-restart)
service_routed radv-restart
;;
ipv6_prefix_delegation)
service_routed radv-restart
;;
# ipv6_nameserver|ipv6_dnssl)
# service_routed radv-restart
# ;;
ipv6_prefix|ipv6_nameserver)
if [ "$MODEL_NUM" = "DPC3941B" ] || [ "$MODEL_NUM" = "DPC3939B" ] || [ "$MODEL_NUM" = "CGA4131COM" ] || [ "$MODEL_NUM" = "CGA4332COM" ]; then
if [ "$MODEL_NUM" = "DPC3941B" ] || [ "$MODEL_NUM" = "DPC3939B" ] || [ "$MODEL_NUM" = "CGA4131COM" ] || [ "$MODEL_NUM" = "CGA4332COM" ] || [ "$MODEL_NUM" = "SG417DBCT" ]; then
service_routed radv-restart
fi
;;
Expand Down
3 changes: 3 additions & 0 deletions source/service_ipv6/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ AM_CPPFLAGS = -I$(top_srcdir)/source/include \

AM_LDFLAGS = -lccsp_common -lsecure_wrapper $(DBUS_LIBS)

if ONESTACK_PRODUCT_REQ
AM_LDFLAGS += -ldevicemode -lonestack_syscfg -lonestack_log -lrdkb_feature_mode_gate
endif
service_ipv6_SOURCES = service_ipv6.c service_ipv6_main.c

service_ipv6_LDADD = $(top_builddir)/source/util/utils/libutopiautil.la \
Expand Down
Loading
Loading