From 349c745601fa84b4dbbd93596e20280e5e744c25 Mon Sep 17 00:00:00 2001 From: rirfha948 Date: Fri, 6 Feb 2026 04:54:33 +0000 Subject: [PATCH 01/14] RDKB-0000: OneStack - IPV6 PREFIX DELEGATION handling. Reason for change: Added One Stack MACRO handling Test Procedure: - TBD Risks: None Priority: P3 Signed-off-by: rirfha948 --- source/firewall/firewall.h | 4 +- source/firewall/firewall_ipv6.c | 37 ++++- .../init/c_registration/15_dhcpv6_client.c | 2 +- .../init/c_registration/15_dhcpv6_server.c | 2 +- .../scripts/init/c_registration/20_routing.c | 2 +- source/service_ipv6/service_ipv6.c | 55 ++++++- source/service_routed/service_routed.c | 143 +++++++++++++++--- 7 files changed, 208 insertions(+), 37 deletions(-) diff --git a/source/firewall/firewall.h b/source/firewall/firewall.h index 2d3bc2a4..f2d42317 100644 --- a/source/firewall/firewall.h +++ b/source/firewall/firewall.h @@ -619,7 +619,7 @@ 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. * @@ -630,7 +630,7 @@ int prepare_ipv6_rule_ex_mode(FILE *raw_fp, FILE *mangle_fp, FILE *nat_fp, FILE * @retval -1 on failure. * */ -int prepare_ipv6_multinet(FILE *fp); +static int prepare_ipv6_multinet(FILE *fp); #endif diff --git a/source/firewall/firewall_ipv6.c b/source/firewall/firewall_ipv6.c index 442402c7..180a3041 100644 --- a/source/firewall/firewall_ipv6.c +++ b/source/firewall/firewall_ipv6.c @@ -97,6 +97,24 @@ #include #include #endif +/* ===== OneStack Feature Support Patch ===== */ + +#ifdef _ONESTACK_PRODUCT_REQ_ + +#ifndef FEATURE_IPV6_DELEGATION +#define FEATURE_IPV6_DELEGATION 1 +#endif + +/* Dummy runtime feature check — always enabled */ +static inline bool isFeatureSupportedInCurrentMode(int feature) +{ + (void)feature; + return true; +} + +#endif /* _ONESTACK_PRODUCT_REQ_ */ + +/* ========================================== */ void* bus_handle ; int sysevent_fd; @@ -862,11 +880,17 @@ void do_ipv6_filter_table(FILE *fp){ } #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; @@ -1705,9 +1729,16 @@ void do_ipv6_filter_table(FILE *fp){ FIREWALL_DEBUG("Exiting prepare_ipv6_firewall \n"); } -#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_) static 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; diff --git a/source/scripts/init/c_registration/15_dhcpv6_client.c b/source/scripts/init/c_registration/15_dhcpv6_client.c index 0ec17f83..b33d10f1 100644 --- a/source/scripts/init/c_registration/15_dhcpv6_client.c +++ b/source/scripts/init/c_registration/15_dhcpv6_client.c @@ -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", diff --git a/source/scripts/init/c_registration/15_dhcpv6_server.c b/source/scripts/init/c_registration/15_dhcpv6_server.c index 0c45dfcd..c44e0fb1 100644 --- a/source/scripts/init/c_registration/15_dhcpv6_server.c +++ b/source/scripts/init/c_registration/15_dhcpv6_server.c @@ -47,7 +47,7 @@ const char* SERVICE_CUSTOM_EVENTS[] = { "dhcpv6_server-restart|/usr/bin/service_ipv6", NULL }; -#elif defined (CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) +#elif defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(_ONESTACK_PRODUCT_REQ_) const char* SERVICE_CUSTOM_EVENTS[] = { "dhcpv6_option_changed|/etc/utopia/service.d/service_dhcpv6_server.sh|NULL|"TUPLE_FLAG_EVENT, NULL diff --git a/source/scripts/init/c_registration/20_routing.c b/source/scripts/init/c_registration/20_routing.c index b68ce5fc..a410aa7e 100644 --- a/source/scripts/init/c_registration/20_routing.c +++ b/source/scripts/init/c_registration/20_routing.c @@ -44,7 +44,7 @@ #define SERVICE_NAME "routed" #define SERVICE_DEFAULT_HANDLER "/etc/utopia/service.d/service_routed.sh" -#ifdef CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION +#if defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(_ONESTACK_PRODUCT_REQ_) const char* SERVICE_CUSTOM_EVENTS[] = { "wan-status|/etc/utopia/service.d/service_routed.sh", "lan-status|/etc/utopia/service.d/service_routed.sh", diff --git a/source/service_ipv6/service_ipv6.c b/source/service_ipv6/service_ipv6.c index a8d99354..e9ccead6 100644 --- a/source/service_ipv6/service_ipv6.c +++ b/source/service_ipv6/service_ipv6.c @@ -52,6 +52,24 @@ #include #include "ccsp_memory.h" #endif +/* ===== OneStack Feature Support Patch ===== */ + +#ifdef _ONESTACK_PRODUCT_REQ_ + +#ifndef FEATURE_IPV6_DELEGATION +#define FEATURE_IPV6_DELEGATION 1 +#endif + +/* Dummy runtime feature check — always enabled */ +static inline bool isFeatureSupportedInCurrentMode(int feature) +{ + (void)feature; + return true; +} + +#endif /* _ONESTACK_PRODUCT_REQ_ */ + +/* ========================================== */ #ifdef _HUB4_PRODUCT_REQ_ #include "ccsp_dm_api.h" @@ -391,10 +409,21 @@ STATIC int get_dhcpv6s_pool_cfg(struct serv_ipv6 *si6, dhcpv6s_pool_cfg_t *cfg) DHCPV6S_SYSCFG_GETI(DHCPV6S_NAME, "pool", cfg->index, "", 0, "X_RDKCENTRAL_COM_DNSServersEnabled", cfg->X_RDKCENTRAL_COM_DNSServersEnabled); #ifdef MULTILAN_FEATURE -#ifdef CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION - DHCPV6S_SYSCFG_GETS(DHCPV6S_NAME, "pool", cfg->index, "", 0, "IAInterface", iface_name); -#else - DHCPV6S_SYSCFG_GETS(DHCPV6S_NAME, "pool", cfg->index, "", 0, "Interface", iface_name); +#if defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(_ONESTACK_PRODUCT_REQ_) + #if defined(_ONESTACK_PRODUCT_REQ_) + if (isFeatureSupportedInCurrentMode(FEATURE_IPV6_DELEGATION) == true) + #endif + { + DHCPV6S_SYSCFG_GETS(DHCPV6S_NAME, "pool", cfg->index, "", 0, "IAInterface", iface_name); + } +#endif +#if !defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(_ONESTACK_PRODUCT_REQ_) + #if defined(_ONESTACK_PRODUCT_REQ_) + if (isFeatureSupportedInCurrentMode(FEATURE_IPV6_DELEGATION) == false) + #endif + { + DHCPV6S_SYSCFG_GETS(DHCPV6S_NAME, "pool", cfg->index, "", 0, "Interface", iface_name); + } #endif #else DHCPV6S_SYSCFG_GETS(DHCPV6S_NAME, "pool", cfg->index, "", 0, "IAInterface", cfg->interface); @@ -606,7 +635,7 @@ STATIC int get_prefix_info(const char *prefix, char *value, unsigned int val_le STATIC int get_active_lanif(struct serv_ipv6 *si6, unsigned int insts[], unsigned int *num) { int i = 0; -#if !defined(MULTILAN_FEATURE) || defined CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION +#if !defined(MULTILAN_FEATURE) || defined CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION || defined(_ONESTACK_PRODUCT_REQ_) char active_insts[32] = {0}; char lan_pd_if[128] = {0}; char *p = NULL; @@ -628,7 +657,11 @@ STATIC int get_active_lanif(struct serv_ipv6 *si6, unsigned int insts[], unsigne unsigned int max_active_if_count = 0; int primary_l3_instance = 0; -#ifdef CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION +#if defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(_ONESTACK_PRODUCT_REQ_) + #if defined(_ONESTACK_PRODUCT_REQ_) + if (isFeatureSupportedInCurrentMode(FEATURE_IPV6_DELEGATION)) + #endif + { syscfg_get(NULL, "lan_pd_interfaces", lan_pd_if, sizeof(lan_pd_if)); if (lan_pd_if[0] == '\0') { *num = 0; @@ -648,7 +681,14 @@ STATIC int get_active_lanif(struct serv_ipv6 *si6, unsigned int insts[], unsigne p = strtok(NULL, " "); } -#else + } +#endif +#if !defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(_ONESTACK_PRODUCT_REQ_) + #if defined(_ONESTACK_PRODUCT_REQ_) + if (!isFeatureSupportedInCurrentMode(FEATURE_IPV6_DELEGATION)) + #endif + { + /* Get active bridge count from PSM */ if (!bus_handle) { fprintf(stderr, "DBUS not connected, returning \n"); @@ -718,6 +758,7 @@ STATIC int get_active_lanif(struct serv_ipv6 *si6, unsigned int insts[], unsigne } /* Set active IPv6 instances */ sysevent_set(si6->sefd, si6->setok, "ipv6_active_inst", active_if_list, 0); + } #endif diff --git a/source/service_routed/service_routed.c b/source/service_routed/service_routed.c index 34e7ca35..50f39ae5 100644 --- a/source/service_routed/service_routed.c +++ b/source/service_routed/service_routed.c @@ -54,6 +54,24 @@ #include #include "safec_lib_common.h" #include "secure_wrapper.h" +/* ===== OneStack Feature Support Patch ===== */ + +#ifdef _ONESTACK_PRODUCT_REQ_ + +#ifndef FEATURE_IPV6_DELEGATION +#define FEATURE_IPV6_DELEGATION 1 +#endif + +/* Dummy runtime feature check — always enabled */ +static inline bool isFeatureSupportedInCurrentMode(int feature) +{ + (void)feature; + return true; +} + +#endif /* _ONESTACK_PRODUCT_REQ_ */ + +/* ========================================== */ #if defined (_CBR_PRODUCT_REQ_) || defined (_BWG_PRODUCT_REQ_) || defined (_CBR2_PRODUCT_REQ_) #include @@ -425,8 +443,11 @@ STATIC int get_active_lanif(int sefd, token_t setok, unsigned int *insts, unsign char *p = NULL; int i = 0; -#ifdef CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION - +#if defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(_ONESTACK_PRODUCT_REQ_) + #if defined(_ONESTACK_PRODUCT_REQ_) + if (isFeatureSupportedInCurrentMode(FEATURE_IPV6_DELEGATION)) + #endif + { char lan_pd_if[128] = {0}; char if_name[16] = {0}; char buf[64] = {0}; @@ -449,8 +470,13 @@ STATIC int get_active_lanif(int sefd, token_t setok, unsigned int *insts, unsign p = strtok(NULL, " "); } - -#else + } +#endif +#if !defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(_ONESTACK_PRODUCT_REQ_) + #if defined(_ONESTACK_PRODUCT_REQ_) + if (!isFeatureSupportedInCurrentMode(FEATURE_IPV6_DELEGATION)) + #endif + { /* service_ipv6 sets active IPv6 interfaces instances. */ sysevent_get(sefd, setok, "ipv6_active_inst", active_insts, sizeof(active_insts)); @@ -459,14 +485,14 @@ STATIC int get_active_lanif(int sefd, token_t setok, unsigned int *insts, unsign insts[i++] = atoi(p); p = strtok(NULL, " "); } - + } #endif *num = i; return *num; } #else -#ifdef CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION +#if defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(_ONESTACK_PRODUCT_REQ_) STATIC int get_active_lanif(int sefd, token_t setok, unsigned int *insts, unsigned int *num) { char active_insts[32] = {0}; @@ -505,7 +531,11 @@ STATIC int get_active_lanif(int sefd, token_t setok, unsigned int *insts, unsign STATIC int route_set(struct serv_routed *sr) { -#if defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(MULTILAN_FEATURE) +#if defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(MULTILAN_FEATURE) || defined(_ONESTACK_PRODUCT_REQ_) + #if defined(_ONESTACK_PRODUCT_REQ_) + if (isFeatureSupportedInCurrentMode(FEATURE_IPV6_DELEGATION)) + #endif + { unsigned int l2_insts[4] = {0}; unsigned int enabled_iface_num = 0; char evt_name[64] = {0}; @@ -560,6 +590,7 @@ STATIC int route_set(struct serv_routed *sr) lan_if, lan_if, lan_if, lan_if); #endif } + } #endif #if defined (_HUB4_PRODUCT_REQ_) && (!defined (_WNXL11BWL_PRODUCT_REQ_)) || defined(_SCER11BEL_PRODUCT_REQ_) @@ -657,7 +688,11 @@ STATIC int route_unset(struct serv_routed *sr) #ifdef CORE_NET_LIB libnet_status status; #endif -#if defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(MULTILAN_FEATURE) +#if defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(MULTILAN_FEATURE) || defined(_ONESTACK_PRODUCT_REQ_) +#ifdef _ONESTACK_PRODUCT_REQ_ + if (isFeatureSupportedInCurrentMode(FEATURE_IPV6_DELEGATION)) +#endif + { unsigned int l2_insts[4] = {0}; unsigned int enabled_iface_num = 0; char evt_name[64] = {0}; @@ -689,7 +724,8 @@ STATIC int route_unset(struct serv_routed *sr) #endif } -#elif !defined(WAN_MANAGER_UNIFICATION_ENABLED) //Default route is configured WanManager. + } +#elif !defined(WAN_MANAGER_UNIFICATION_ENABLED) #if defined (_HUB4_PRODUCT_REQ_) && (!defined (_WNXL11BWL_PRODUCT_REQ_)) || defined(_RDKB_GLOBAL_PRODUCT_REQ_) #ifdef CORE_NET_LIB status = rule_delete("-6 iif brlan0 table erouter"); @@ -901,7 +937,7 @@ STATIC int gen_zebra_conf(int sefd, token_t setok) "!log stdout\n" "log file /var/tmp/zebra.log errors\n" "table 255\n"; -#if defined(MULTILAN_FEATURE) || defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) +#if defined(MULTILAN_FEATURE) || defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(_ONESTACK_PRODUCT_REQ_) int i = 0; unsigned int l2_insts[4] = {0}; unsigned int enabled_iface_num = 0; @@ -1000,15 +1036,27 @@ STATIC int gen_zebra_conf(int sefd, token_t setok) #endif syscfg_get(NULL, "ra_interval", ra_interval, sizeof(ra_interval)); -#ifdef CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION + +#ifdef WAN_FAILOVER_SUPPORTED + char last_broadcasted_prefix[64] = {0}; +#endif +#if defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(_ONESTACK_PRODUCT_REQ_) + #if defined(_ONESTACK_PRODUCT_REQ_) + if (isFeatureSupportedInCurrentMode(FEATURE_IPV6_DELEGATION)) + #endif + { sysevent_get(sefd, setok, "previous_ipv6_prefix", orig_prefix, sizeof(orig_prefix)); sysevent_get(sefd, setok, "ipv6_prefix_prdtime", preferred_lft, sizeof(preferred_lft)); sysevent_get(sefd, setok, "ipv6_prefix_vldtime", valid_lft, sizeof(valid_lft)); -#else - + } +#endif +#if !defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(_ONESTACK_PRODUCT_REQ_) + #if defined(_ONESTACK_PRODUCT_REQ_) + if (!isFeatureSupportedInCurrentMode(FEATURE_IPV6_DELEGATION)) + #endif + { #ifdef WAN_FAILOVER_SUPPORTED - char last_broadcasted_prefix[64] ; memset(last_broadcasted_prefix,0,sizeof(last_broadcasted_prefix)); if (gIpv6AddrAssignment == ULA_IPV6) { @@ -1119,6 +1167,7 @@ STATIC int gen_zebra_conf(int sefd, token_t setok) sysevent_get(sefd, setok, "ipv6_prefix_vldtime", valid_lft, sizeof(valid_lft)); #endif syscfg_get(NULL, "lan_ifname", lan_if, sizeof(lan_if)); + } #endif if (atoi(preferred_lft) <= 0) snprintf(preferred_lft, sizeof(preferred_lft), "300"); @@ -1131,7 +1180,24 @@ STATIC int gen_zebra_conf(int sefd, token_t setok) sysevent_get(sefd, setok, "wan-status", wan_st, sizeof(wan_st)); syscfg_get(NULL, "last_erouter_mode", rtmod, sizeof(rtmod)); -#if defined(MULTILAN_FEATURE) || defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) + +#if defined(MULTILAN_FEATURE) || defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined (_ONESTACK_PRODUCT_REQ_) + int multilan_enabled = 0; + int pd_enabled = 0; + +#if defined(MULTILAN_FEATURE) + multilan_enabled = 1; +#endif +#if defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) + pd_enabled = 1; +#endif + + #ifdef _ONESTACK_PRODUCT_REQ_ + pd_enabled = isFeatureSupportedInCurrentMode(FEATURE_IPV6_DELEGATION); + #endif + + if (pd_enabled || multilan_enabled) + { get_active_lanif(sefd, setok, l2_insts, &enabled_iface_num); for (i = 0; i < enabled_iface_num; i++) { @@ -1438,11 +1504,22 @@ STATIC int gen_zebra_conf(int sefd, token_t setok) if ((strncmp(buf,"true",4) == 0) && iresCode == 204) { #if defined (_COSA_BCM_MIPS_) -#ifdef CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION +#if defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(_ONESTACK_PRODUCT_REQ_) + #if defined(_ONESTACK_PRODUCT_REQ_) + if (isFeatureSupportedInCurrentMode(FEATURE_IPV6_DELEGATION)) + #endif + { // For CBR platform, the captive portal redirection feature was removed // inWifiCp = 1; -#else + } +#endif +#if !defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(_ONESTACK_PRODUCT_REQ_) + #if defined(_ONESTACK_PRODUCT_REQ_) + if (!isFeatureSupportedInCurrentMode(FEATURE_IPV6_DELEGATION)) + #endif + { inWifiCp = 1; + } #endif #else inWifiCp = 1; @@ -1557,16 +1634,32 @@ STATIC int gen_zebra_conf(int sefd, token_t setok) } #endif /* static IPv6 DNS */ -#ifdef CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION +#if defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(_ONESTACK_PRODUCT_REQ_) + #if defined(_ONESTACK_PRODUCT_REQ_) + if (isFeatureSupportedInCurrentMode(FEATURE_IPV6_DELEGATION)) + #endif + { snprintf(rec, sizeof(rec), "dhcpv6spool%d0::optionnumber", i); syscfg_get(NULL, rec, val, sizeof(val)); -#else + } +#endif +#if !defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(_ONESTACK_PRODUCT_REQ_) + #if defined(_ONESTACK_PRODUCT_REQ_) + if (!isFeatureSupportedInCurrentMode(FEATURE_IPV6_DELEGATION)) + #endif + { syscfg_get(NULL, "dhcpv6spool00::optionnumber", val, sizeof(val)); + } #endif nopt = atoi(val); for (j = 0; j < nopt; j++) { -#ifdef CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION +#if defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(_ONESTACK_PRODUCT_REQ_) + #if defined(_ONESTACK_PRODUCT_REQ_) + if (isFeatureSupportedInCurrentMode(FEATURE_IPV6_DELEGATION)) + #endif + { memset(name_servs, 0, sizeof(name_servs)); + } #endif snprintf(rec, sizeof(rec), "dhcpv6spool0option%d::bEnabled", j); /*RDKB-12965 & CID:-34147*/ syscfg_get(NULL, rec, val, sizeof(val)); @@ -1709,11 +1802,16 @@ STATIC int gen_zebra_conf(int sefd, token_t setok) fprintf(fp, "interface %s\n", lan_if); fprintf(fp, " ip irdp multicast\n"); -#if defined(MULTILAN_FEATURE) || defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) +#if defined(MULTILAN_FEATURE) || defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(_ONESTACK_PRODUCT_REQ_) } //for (i = 0; i < enabled_iface_num; i++) + } #endif -#ifndef CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION +#if !defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(_ONESTACK_PRODUCT_REQ_) +#ifdef _ONESTACK_PRODUCT_REQ_ +if (!isFeatureSupportedInCurrentMode(FEATURE_IPV6_DELEGATION)) +#endif +{ char cmd[100]; char out[100]; char interface_name[32] = {0}; @@ -1925,6 +2023,7 @@ if(!strncmp(out,"true",strlen(out))) memset(out,0,sizeof(out)); } } +} #endif fclose(fp); return 0; From b70d5a5b8c83ee94d46ba0b812bceb40cc0679e0 Mon Sep 17 00:00:00 2001 From: rirfha948 Date: Fri, 6 Feb 2026 05:34:05 +0000 Subject: [PATCH 02/14] RDKB-0000: OneStack - IPV6 PREFIX DELEGATION handling. Reason for change: Added One Stack MACRO handling Test Procedure: - TBD Risks: None Priority: P3 Signed-off-by: rirfha948 --- source/firewall/firewall.h | 5 +++-- source/firewall/firewall_ipv6.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/source/firewall/firewall.h b/source/firewall/firewall.h index f2d42317..b2fffee3 100644 --- a/source/firewall/firewall.h +++ b/source/firewall/firewall.h @@ -619,7 +619,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_)) || defined(_ONESTACK_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. * @@ -630,7 +631,7 @@ int prepare_ipv6_rule_ex_mode(FILE *raw_fp, FILE *mangle_fp, FILE *nat_fp, FILE * @retval -1 on failure. * */ -static int prepare_ipv6_multinet(FILE *fp); +int prepare_ipv6_multinet(FILE *fp); #endif diff --git a/source/firewall/firewall_ipv6.c b/source/firewall/firewall_ipv6.c index 180a3041..46d65f35 100644 --- a/source/firewall/firewall_ipv6.c +++ b/source/firewall/firewall_ipv6.c @@ -1729,8 +1729,9 @@ void do_ipv6_filter_table(FILE *fp){ FIREWALL_DEBUG("Exiting prepare_ipv6_firewall \n"); } -#if (defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) && !defined(_CBR_PRODUCT_REQ_)) || defined(_ONESTACK_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)) From be654562a4c82e77e91cdabfd28ac671c35f41f2 Mon Sep 17 00:00:00 2001 From: rirfha948 Date: Fri, 6 Feb 2026 05:34:05 +0000 Subject: [PATCH 03/14] RDKB-0000: OneStack - IPV6 PREFIX DELEGATION handling. Reason for change: Added One Stack MACRO handling Test Procedure: - TBD Risks: None Priority: P3 Signed-off-by: rirfha948 --- source/firewall/firewall_ipv6.c | 18 ------------------ source/service_ipv6/service_ipv6.c | 18 ------------------ source/service_routed/service_routed.c | 18 ------------------ 3 files changed, 54 deletions(-) diff --git a/source/firewall/firewall_ipv6.c b/source/firewall/firewall_ipv6.c index 46d65f35..dc553518 100644 --- a/source/firewall/firewall_ipv6.c +++ b/source/firewall/firewall_ipv6.c @@ -97,24 +97,6 @@ #include #include #endif -/* ===== OneStack Feature Support Patch ===== */ - -#ifdef _ONESTACK_PRODUCT_REQ_ - -#ifndef FEATURE_IPV6_DELEGATION -#define FEATURE_IPV6_DELEGATION 1 -#endif - -/* Dummy runtime feature check — always enabled */ -static inline bool isFeatureSupportedInCurrentMode(int feature) -{ - (void)feature; - return true; -} - -#endif /* _ONESTACK_PRODUCT_REQ_ */ - -/* ========================================== */ void* bus_handle ; int sysevent_fd; diff --git a/source/service_ipv6/service_ipv6.c b/source/service_ipv6/service_ipv6.c index e9ccead6..b59b6000 100644 --- a/source/service_ipv6/service_ipv6.c +++ b/source/service_ipv6/service_ipv6.c @@ -52,24 +52,6 @@ #include #include "ccsp_memory.h" #endif -/* ===== OneStack Feature Support Patch ===== */ - -#ifdef _ONESTACK_PRODUCT_REQ_ - -#ifndef FEATURE_IPV6_DELEGATION -#define FEATURE_IPV6_DELEGATION 1 -#endif - -/* Dummy runtime feature check — always enabled */ -static inline bool isFeatureSupportedInCurrentMode(int feature) -{ - (void)feature; - return true; -} - -#endif /* _ONESTACK_PRODUCT_REQ_ */ - -/* ========================================== */ #ifdef _HUB4_PRODUCT_REQ_ #include "ccsp_dm_api.h" diff --git a/source/service_routed/service_routed.c b/source/service_routed/service_routed.c index 50f39ae5..e9502d45 100644 --- a/source/service_routed/service_routed.c +++ b/source/service_routed/service_routed.c @@ -54,24 +54,6 @@ #include #include "safec_lib_common.h" #include "secure_wrapper.h" -/* ===== OneStack Feature Support Patch ===== */ - -#ifdef _ONESTACK_PRODUCT_REQ_ - -#ifndef FEATURE_IPV6_DELEGATION -#define FEATURE_IPV6_DELEGATION 1 -#endif - -/* Dummy runtime feature check — always enabled */ -static inline bool isFeatureSupportedInCurrentMode(int feature) -{ - (void)feature; - return true; -} - -#endif /* _ONESTACK_PRODUCT_REQ_ */ - -/* ========================================== */ #if defined (_CBR_PRODUCT_REQ_) || defined (_BWG_PRODUCT_REQ_) || defined (_CBR2_PRODUCT_REQ_) #include From b61e2e1b4b3666e350561795df2b148e6fb23c6b Mon Sep 17 00:00:00 2001 From: rirfha948 Date: Thu, 12 Feb 2026 06:15:37 +0000 Subject: [PATCH 04/14] Onestack headers --- source/firewall/Makefile.am | 3 +++ source/firewall/firewall_ipv6.c | 3 +++ source/service_ipv6/Makefile.am | 3 +++ source/service_ipv6/service_ipv6.c | 3 +++ 4 files changed, 12 insertions(+) diff --git a/source/firewall/Makefile.am b/source/firewall/Makefile.am index 0af5c826..65cb668a 100644 --- a/source/firewall/Makefile.am +++ b/source/firewall/Makefile.am @@ -29,6 +29,9 @@ firewall_SOURCES += firewall_lib.c firewall_dsl.c rabid.c AM_LDFLAGS += -lrdkconfig endif +if _ONESTACK_PRODUCT_REQ_ +AM_LDFLAGS += -ldevicemode -lonestack_syscfg -lonestack_log -lrdkb_feature_mode_gate +endif nfq_handler_SOURCES = raw_socket_send.c nfq_handler.c firewall_LDADD = $(top_builddir)/source/syscfg/lib/libsyscfg.la \ diff --git a/source/firewall/firewall_ipv6.c b/source/firewall/firewall_ipv6.c index dc553518..f019776e 100644 --- a/source/firewall/firewall_ipv6.c +++ b/source/firewall/firewall_ipv6.c @@ -98,6 +98,9 @@ #include #endif +#ifdef _ONESTACK_PRODUCT_REQ_ +#include +#endif void* bus_handle ; int sysevent_fd; char sysevent_ip[19]; diff --git a/source/service_ipv6/Makefile.am b/source/service_ipv6/Makefile.am index 8e96cfff..6c1187f2 100644 --- a/source/service_ipv6/Makefile.am +++ b/source/service_ipv6/Makefile.am @@ -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 \ diff --git a/source/service_ipv6/service_ipv6.c b/source/service_ipv6/service_ipv6.c index b59b6000..f2f4fdb9 100644 --- a/source/service_ipv6/service_ipv6.c +++ b/source/service_ipv6/service_ipv6.c @@ -53,6 +53,9 @@ #include "ccsp_memory.h" #endif +#ifdef _ONESTACK_PRODUCT_REQ_ +#include +#endif #ifdef _HUB4_PRODUCT_REQ_ #include "ccsp_dm_api.h" #include "ccsp_custom.h" From 6870c725c659cb5e383cbca9c0020f5e417fafbd Mon Sep 17 00:00:00 2001 From: rirfha948 Date: Thu, 12 Feb 2026 06:43:25 +0000 Subject: [PATCH 05/14] Onestack headers --- source/firewall/Makefile.am | 2 +- source/service_ipv6/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/firewall/Makefile.am b/source/firewall/Makefile.am index 65cb668a..6ac566cf 100644 --- a/source/firewall/Makefile.am +++ b/source/firewall/Makefile.am @@ -29,7 +29,7 @@ firewall_SOURCES += firewall_lib.c firewall_dsl.c rabid.c AM_LDFLAGS += -lrdkconfig endif -if _ONESTACK_PRODUCT_REQ_ +if ONESTACK_PRODUCT_REQ AM_LDFLAGS += -ldevicemode -lonestack_syscfg -lonestack_log -lrdkb_feature_mode_gate endif nfq_handler_SOURCES = raw_socket_send.c nfq_handler.c diff --git a/source/service_ipv6/Makefile.am b/source/service_ipv6/Makefile.am index 6c1187f2..6f4c7f9d 100644 --- a/source/service_ipv6/Makefile.am +++ b/source/service_ipv6/Makefile.am @@ -25,7 +25,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/source/include \ AM_LDFLAGS = -lccsp_common -lsecure_wrapper $(DBUS_LIBS) -if _ONESTACK_PRODUCT_REQ_ +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 From 031c75c4d85c4e5fbcc339e84b8900b72fce000a Mon Sep 17 00:00:00 2001 From: rirfha948 Date: Thu, 12 Feb 2026 07:04:26 +0000 Subject: [PATCH 06/14] Onestack headers --- source/service_routed/Makefile.am | 3 +++ source/service_routed/service_routed.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/source/service_routed/Makefile.am b/source/service_routed/Makefile.am index e869e8de..4056e1ab 100644 --- a/source/service_routed/Makefile.am +++ b/source/service_routed/Makefile.am @@ -21,6 +21,9 @@ bin_PROGRAMS = service_routed AM_LDFLAGS = -lsecure_wrapper +if ONESTACK_PRODUCT_REQ +AM_LDFLAGS += -ldevicemode -lonestack_syscfg -lonestack_log -lrdkb_feature_mode_gate +endif service_routed_SOURCES = service_routed.c service_routed_main.c service_routed_CFLAGS = -I$(top_srcdir)/source \ diff --git a/source/service_routed/service_routed.c b/source/service_routed/service_routed.c index e9502d45..14417781 100644 --- a/source/service_routed/service_routed.c +++ b/source/service_routed/service_routed.c @@ -59,6 +59,9 @@ #include #endif +#ifdef _ONESTACK_PRODUCT_REQ_ +#include +#endif #include "util.h" #include #include "sysevent/sysevent.h" From 45741d658831f439fb4de565e13b068a4e9785aa Mon Sep 17 00:00:00 2001 From: rirfha948 Date: Thu, 12 Feb 2026 07:57:22 +0000 Subject: [PATCH 07/14] Onestack headers --- source/service_routed/Makefile.am | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/source/service_routed/Makefile.am b/source/service_routed/Makefile.am index 4056e1ab..4d3d3992 100644 --- a/source/service_routed/Makefile.am +++ b/source/service_routed/Makefile.am @@ -19,11 +19,10 @@ bin_PROGRAMS = service_routed -AM_LDFLAGS = -lsecure_wrapper +AM_LDFLAGS = -lccsp_common -lsecure_wrapper + + -if ONESTACK_PRODUCT_REQ -AM_LDFLAGS += -ldevicemode -lonestack_syscfg -lonestack_log -lrdkb_feature_mode_gate -endif service_routed_SOURCES = service_routed.c service_routed_main.c service_routed_CFLAGS = -I$(top_srcdir)/source \ @@ -43,6 +42,9 @@ service_routed_LDADD = $(top_builddir)/source/util/utils/libutopiautil.la \ $(top_builddir)/source/utctx/lib/libutctx.la \ $(top_builddir)/source/ulog/libulog.la \ -ltelemetry_msgsender +if ONESTACK_PRODUCT_REQ +AM_LDFLAGS += -ldevicemode -lonestack_syscfg -lonestack_log -lrdkb_feature_mode_gate +endif if CORE_NET_LIB_FEATURE_SUPPORT service_routed_LDFLAGS = -lnet endif From 4a090a1872f8d4b47d26eb5dcf4dda2afa26cd1a Mon Sep 17 00:00:00 2001 From: rirfha948 Date: Thu, 12 Feb 2026 08:41:52 +0000 Subject: [PATCH 08/14] Onestack headers --- source/service_ipv6/Makefile.am | 2 +- source/service_routed/Makefile.am | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/source/service_ipv6/Makefile.am b/source/service_ipv6/Makefile.am index 6f4c7f9d..0415acb1 100644 --- a/source/service_ipv6/Makefile.am +++ b/source/service_ipv6/Makefile.am @@ -26,7 +26,7 @@ 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 +service_ipv6_LDFLAGS += -ldevicemode -lonestack_syscfg -lonestack_log -lrdkb_feature_mode_gate endif service_ipv6_SOURCES = service_ipv6.c service_ipv6_main.c diff --git a/source/service_routed/Makefile.am b/source/service_routed/Makefile.am index 4d3d3992..6f67588a 100644 --- a/source/service_routed/Makefile.am +++ b/source/service_routed/Makefile.am @@ -21,8 +21,6 @@ bin_PROGRAMS = service_routed AM_LDFLAGS = -lccsp_common -lsecure_wrapper - - service_routed_SOURCES = service_routed.c service_routed_main.c service_routed_CFLAGS = -I$(top_srcdir)/source \ @@ -43,7 +41,7 @@ service_routed_LDADD = $(top_builddir)/source/util/utils/libutopiautil.la \ $(top_builddir)/source/ulog/libulog.la \ -ltelemetry_msgsender if ONESTACK_PRODUCT_REQ -AM_LDFLAGS += -ldevicemode -lonestack_syscfg -lonestack_log -lrdkb_feature_mode_gate +service_routed_LDFLAGS += -ldevicemode -lonestack_syscfg -lonestack_log -lrdkb_feature_mode_gate endif if CORE_NET_LIB_FEATURE_SUPPORT service_routed_LDFLAGS = -lnet From 036eefff477bc6405715914f823ddfc3fb8e68eb Mon Sep 17 00:00:00 2001 From: rirfha948 Date: Thu, 12 Feb 2026 08:55:12 +0000 Subject: [PATCH 09/14] Onestack headers --- source/service_ipv6/Makefile.am | 4 ++-- source/service_routed/Makefile.am | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/service_ipv6/Makefile.am b/source/service_ipv6/Makefile.am index 0415acb1..c6fc0ecd 100644 --- a/source/service_ipv6/Makefile.am +++ b/source/service_ipv6/Makefile.am @@ -26,7 +26,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/source/include \ AM_LDFLAGS = -lccsp_common -lsecure_wrapper $(DBUS_LIBS) if ONESTACK_PRODUCT_REQ -service_ipv6_LDFLAGS += -ldevicemode -lonestack_syscfg -lonestack_log -lrdkb_feature_mode_gate +service_ipv6_LDFLAGS = -ldevicemode -lonestack_syscfg -lonestack_log -lrdkb_feature_mode_gate endif service_ipv6_SOURCES = service_ipv6.c service_ipv6_main.c @@ -36,5 +36,5 @@ service_ipv6_LDADD = $(top_builddir)/source/util/utils/libutopiautil.la \ $(top_builddir)/source/syscfg/lib/libsyscfg.la \ $(top_builddir)/source/ulog/libulog.la if CORE_NET_LIB_FEATURE_SUPPORT -service_ipv6_LDFLAGS = -lnet +service_ipv6_LDFLAGS += -lnet endif diff --git a/source/service_routed/Makefile.am b/source/service_routed/Makefile.am index 6f67588a..7a64ed2f 100644 --- a/source/service_routed/Makefile.am +++ b/source/service_routed/Makefile.am @@ -41,8 +41,8 @@ service_routed_LDADD = $(top_builddir)/source/util/utils/libutopiautil.la \ $(top_builddir)/source/ulog/libulog.la \ -ltelemetry_msgsender if ONESTACK_PRODUCT_REQ -service_routed_LDFLAGS += -ldevicemode -lonestack_syscfg -lonestack_log -lrdkb_feature_mode_gate +service_routed_LDFLAGS = -ldevicemode -lonestack_syscfg -lonestack_log -lrdkb_feature_mode_gate endif if CORE_NET_LIB_FEATURE_SUPPORT -service_routed_LDFLAGS = -lnet +service_routed_LDFLAGS += -lnet endif From 39458ccee506489638c795264a1b5f66b5c36337 Mon Sep 17 00:00:00 2001 From: rirfha948 Date: Thu, 12 Feb 2026 09:21:34 +0000 Subject: [PATCH 10/14] Onestack header --- source/service_ipv6/Makefile.am | 4 ++-- source/service_routed/Makefile.am | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source/service_ipv6/Makefile.am b/source/service_ipv6/Makefile.am index c6fc0ecd..6f4c7f9d 100644 --- a/source/service_ipv6/Makefile.am +++ b/source/service_ipv6/Makefile.am @@ -26,7 +26,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/source/include \ AM_LDFLAGS = -lccsp_common -lsecure_wrapper $(DBUS_LIBS) if ONESTACK_PRODUCT_REQ -service_ipv6_LDFLAGS = -ldevicemode -lonestack_syscfg -lonestack_log -lrdkb_feature_mode_gate +AM_LDFLAGS += -ldevicemode -lonestack_syscfg -lonestack_log -lrdkb_feature_mode_gate endif service_ipv6_SOURCES = service_ipv6.c service_ipv6_main.c @@ -36,5 +36,5 @@ service_ipv6_LDADD = $(top_builddir)/source/util/utils/libutopiautil.la \ $(top_builddir)/source/syscfg/lib/libsyscfg.la \ $(top_builddir)/source/ulog/libulog.la if CORE_NET_LIB_FEATURE_SUPPORT -service_ipv6_LDFLAGS += -lnet +service_ipv6_LDFLAGS = -lnet endif diff --git a/source/service_routed/Makefile.am b/source/service_routed/Makefile.am index 7a64ed2f..a777bde7 100644 --- a/source/service_routed/Makefile.am +++ b/source/service_routed/Makefile.am @@ -29,8 +29,8 @@ service_routed_CFLAGS = -I$(top_srcdir)/source \ -I$(top_srcdir)/source/utapi/lib \ -I$(top_srcdir)/source/util/utils \ -I${PKG_CONFIG_SYSROOT_DIR}$(includedir)/dbus-1.0 \ - -I${PKG_CONFIG_SYSROOT_DIR}$(libdir)/dbus-1.0/include - + -I${PKG_CONFIG_SYSROOT_DIR}$(libdir)/dbus-1.0/include \ + -I${PKG_CONFIG_SYSROOT_DIR}$(includedir) service_routed_LDADD = $(top_builddir)/source/util/utils/libutopiautil.la \ $(top_builddir)/source/services/lib/libsrvmgr.la \ @@ -41,8 +41,8 @@ service_routed_LDADD = $(top_builddir)/source/util/utils/libutopiautil.la \ $(top_builddir)/source/ulog/libulog.la \ -ltelemetry_msgsender if ONESTACK_PRODUCT_REQ -service_routed_LDFLAGS = -ldevicemode -lonestack_syscfg -lonestack_log -lrdkb_feature_mode_gate +AM_LDFLAGS += -L${PKG_CONFIG_SYSROOT_DIR}$(libdir) -ldevicemode -lonestack_syscfg -lonestack_log -lrdkb_feature_mode_gate endif if CORE_NET_LIB_FEATURE_SUPPORT -service_routed_LDFLAGS += -lnet +service_routed_LDFLAGS = -lnet endif From 289bdf78d09b3d2cdd88b29eedbefa85e20f51c7 Mon Sep 17 00:00:00 2001 From: rirfha948 Date: Thu, 12 Feb 2026 10:09:53 +0000 Subject: [PATCH 11/14] Correction --- source/service_routed/Makefile.am | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/service_routed/Makefile.am b/source/service_routed/Makefile.am index a777bde7..5d54554f 100644 --- a/source/service_routed/Makefile.am +++ b/source/service_routed/Makefile.am @@ -19,7 +19,11 @@ bin_PROGRAMS = service_routed -AM_LDFLAGS = -lccsp_common -lsecure_wrapper +AM_CPPFLAGS = -I$(top_srcdir)/source/include \ + -I$(top_srcdir)/source/util/utils \ + $(DBUS_CFLAGS) + +AM_LDFLAGS = -lccsp_common -lsecure_wrapper $(DBUS_LIBS) service_routed_SOURCES = service_routed.c service_routed_main.c From 5ce4966c0998f5a2d4b08e0c654cfcf039309b52 Mon Sep 17 00:00:00 2001 From: rirfha948 Date: Thu, 12 Feb 2026 10:54:56 +0000 Subject: [PATCH 12/14] Correction --- source/service_routed/Makefile.am | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/service_routed/Makefile.am b/source/service_routed/Makefile.am index 5d54554f..a82c0f34 100644 --- a/source/service_routed/Makefile.am +++ b/source/service_routed/Makefile.am @@ -44,9 +44,7 @@ service_routed_LDADD = $(top_builddir)/source/util/utils/libutopiautil.la \ $(top_builddir)/source/utctx/lib/libutctx.la \ $(top_builddir)/source/ulog/libulog.la \ -ltelemetry_msgsender -if ONESTACK_PRODUCT_REQ AM_LDFLAGS += -L${PKG_CONFIG_SYSROOT_DIR}$(libdir) -ldevicemode -lonestack_syscfg -lonestack_log -lrdkb_feature_mode_gate -endif if CORE_NET_LIB_FEATURE_SUPPORT service_routed_LDFLAGS = -lnet endif From e40b2b36a5d71865ec497284d440d31eb2f5c382 Mon Sep 17 00:00:00 2001 From: rirfha948 Date: Thu, 12 Feb 2026 12:01:26 +0000 Subject: [PATCH 13/14] Correction --- source/service_routed/Makefile.am | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/service_routed/Makefile.am b/source/service_routed/Makefile.am index a82c0f34..372f905c 100644 --- a/source/service_routed/Makefile.am +++ b/source/service_routed/Makefile.am @@ -23,7 +23,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/source/include \ -I$(top_srcdir)/source/util/utils \ $(DBUS_CFLAGS) -AM_LDFLAGS = -lccsp_common -lsecure_wrapper $(DBUS_LIBS) +AM_LDFLAGS = -lsecure_wrapper -lccsp_common $(DBUS_LIBS) service_routed_SOURCES = service_routed.c service_routed_main.c @@ -44,7 +44,7 @@ service_routed_LDADD = $(top_builddir)/source/util/utils/libutopiautil.la \ $(top_builddir)/source/utctx/lib/libutctx.la \ $(top_builddir)/source/ulog/libulog.la \ -ltelemetry_msgsender -AM_LDFLAGS += -L${PKG_CONFIG_SYSROOT_DIR}$(libdir) -ldevicemode -lonestack_syscfg -lonestack_log -lrdkb_feature_mode_gate +service_routed_LDFLAGS = -L${PKG_CONFIG_SYSROOT_DIR}$(libdir) -ldevicemode -lonestack_syscfg -lonestack_log -lrdkb_feature_mode_gate if CORE_NET_LIB_FEATURE_SUPPORT -service_routed_LDFLAGS = -lnet +service_routed_LDFLAGS += -lnet endif From c822023e65410ec3e7a814caab4fd40ab25a9f22 Mon Sep 17 00:00:00 2001 From: rirfha948 Date: Thu, 12 Feb 2026 12:18:23 +0000 Subject: [PATCH 14/14] One stack header inclusion --- source/service_routed/Makefile.am | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/service_routed/Makefile.am b/source/service_routed/Makefile.am index 372f905c..5cf9aa9d 100644 --- a/source/service_routed/Makefile.am +++ b/source/service_routed/Makefile.am @@ -44,7 +44,10 @@ service_routed_LDADD = $(top_builddir)/source/util/utils/libutopiautil.la \ $(top_builddir)/source/utctx/lib/libutctx.la \ $(top_builddir)/source/ulog/libulog.la \ -ltelemetry_msgsender -service_routed_LDFLAGS = -L${PKG_CONFIG_SYSROOT_DIR}$(libdir) -ldevicemode -lonestack_syscfg -lonestack_log -lrdkb_feature_mode_gate +service_routed_LDFLAGS = -L${PKG_CONFIG_SYSROOT_DIR}${libdir} +if ONESTACK_PRODUCT_REQ +service_routed_LDFLAGS += -ldevicemode -lonestack_syscfg -lonestack_log -lrdkb_feature_mode_gate +endif if CORE_NET_LIB_FEATURE_SUPPORT service_routed_LDFLAGS += -lnet endif