-
Notifications
You must be signed in to change notification settings - Fork 10
RDKB-63098: Handle IPv6 delegation for business vs residential Partner ID as part of single build #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
RDKB-63098: Handle IPv6 delegation for business vs residential Partner ID as part of single build #68
Changes from 5 commits
cc67999
66f61df
e6c83e2
6a2a122
6cbb20b
bee66c6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,6 +1,6 @@ | ||||||||||
| /* | ||||||||||
| * If not stated otherwise in this file or this component's LICENSE file the | ||||||||||
| * following copyright and licenses apply: | ||||||||||
|
Check failure on line 3 in source/DHCPServerUtils/DHCPv6Server/dhcpv6server_function.c
|
||||||||||
| * | ||||||||||
| * Copyright 2020 RDK Management | ||||||||||
| * | ||||||||||
|
|
@@ -17,7 +17,7 @@ | |||||||||
| * limitations under the License. | ||||||||||
| */ | ||||||||||
|
|
||||||||||
| /********************************************************************** | ||||||||||
|
Check failure on line 20 in source/DHCPServerUtils/DHCPv6Server/dhcpv6server_function.c
|
||||||||||
| Copyright [2014] [Cisco Systems, Inc.] | ||||||||||
|
|
||||||||||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||||||||||
|
|
@@ -47,7 +47,9 @@ | |||||||||
| #include "sysevent/sysevent.h" | ||||||||||
| #include "cosa_apis_util.h" | ||||||||||
| #include "ifl.h" | ||||||||||
|
|
||||||||||
| #ifdef _ONESTACK_PRODUCT_REQ_ | ||||||||||
| #include <rdkb_feature_mode_gate.h> | ||||||||||
| #endif | ||||||||||
| extern void* g_pDslhDmlAgent; | ||||||||||
| extern ANSC_HANDLE bus_handle; | ||||||||||
| extern char g_Subsystem[32]; | ||||||||||
|
|
@@ -76,7 +78,7 @@ | |||||||||
| //#include "cosa_ip_apis.h" | ||||||||||
| #include "cosa_common_util.h" | ||||||||||
|
|
||||||||||
| #if defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) && defined(_COSA_BCM_MIPS_) | ||||||||||
| #if defined((CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) && defined(_COSA_BCM_MIPS_)) || defined(_ONESTACK_PRODUCT_REQ_) | ||||||||||
|
||||||||||
| #if defined((CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) && defined(_COSA_BCM_MIPS_)) || defined(_ONESTACK_PRODUCT_REQ_) | |
| #if (defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) && defined(_COSA_BCM_MIPS_)) || defined(_ONESTACK_PRODUCT_REQ_) |
Copilot
AI
Feb 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This preprocessor condition is invalid C: defined cannot take an expression like (CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) && defined(_COSA_BCM_MIPS_). This will fail compilation. Rewrite as #if (defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) && defined(_COSA_BCM_MIPS_)) || defined(_ONESTACK_PRODUCT_REQ_).
| #if defined((CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) && defined(_COSA_BCM_MIPS_)) || defined(_ONESTACK_PRODUCT_REQ_) | |
| #if (defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) && defined(_COSA_BCM_MIPS_)) || defined(_ONESTACK_PRODUCT_REQ_) |
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issue here: defined ((CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) && ! defined(DHCPV6_PREFIX_FIX)) is not valid preprocessor syntax and will fail compilation. Wrap the expression outside of defined, e.g. (defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) && !defined(DHCPV6_PREFIX_FIX)) || defined(_ONESTACK_PRODUCT_REQ_).
Copilot
AI
Feb 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This #if is not valid: defined ((CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) && ! defined(DHCPV6_PREFIX_FIX)) passes an expression to defined, which will not compile. Use normal boolean composition instead, e.g. #if (defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) && !defined(DHCPV6_PREFIX_FIX)) || defined(_ONESTACK_PRODUCT_REQ_).
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OneStack-specific code calls isFeatureSupportedInCurrentMode(FEATURE_IPV6_DELEGATION), but this file doesn’t declare/define that symbol or the feature macro. Unless provided by an included header, _ONESTACK_PRODUCT_REQ_ builds will fail to compile; consider adding a shared feature header and including it here.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| /************************************************************************************ | ||
|
Check failure on line 1 in source/DHCPServerUtils/DHCPv6Server/service_ipv6.c
|
||
| If not stated otherwise in this file or this component's LICENSE file the | ||
| following copyright and licenses apply: | ||
|
|
||
|
|
@@ -56,7 +56,9 @@ | |
| #include <ccsp_base_api.h> | ||
| #include "ccsp_memory.h" | ||
| #endif | ||
|
|
||
| #ifdef _ONESTACK_PRODUCT_REQ_ | ||
| #include <rdkb_feature_mode_gate.h> | ||
| #endif | ||
| #define PROG_NAME "SERVICE-IPV6" | ||
|
|
||
| #if defined(INTEL_PUMA7) || defined(MULTILAN_FEATURE) | ||
|
|
@@ -380,10 +382,21 @@ | |
| 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 | ||
| #if defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(_ONESTACK_PRODUCT_REQ_) | ||
| #if defined(_ONESTACK_PRODUCT_REQ_) | ||
| if (isFeatureSupportedInCurrentMode(FEATURE_IPV6_DELEGATION)) | ||
| #endif | ||
| { | ||
| DHCPV6S_SYSCFG_GETS(DHCPV6S_NAME, "pool", cfg->index, "", 0, "IAInterface", iface_name); | ||
| #else | ||
| } | ||
| #endif | ||
| #if !defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(_ONESTACK_PRODUCT_REQ_) | ||
| #if defined(_ONESTACK_PRODUCT_REQ_) | ||
| if (!isFeatureSupportedInCurrentMode(FEATURE_IPV6_DELEGATION)) | ||
| #endif | ||
| { | ||
| DHCPV6S_SYSCFG_GETS(DHCPV6S_NAME, "pool", cfg->index, "", 0, "Interface", iface_name); | ||
| } | ||
|
Comment on lines
+385
to
+399
|
||
| #endif | ||
| #else | ||
| DHCPV6S_SYSCFG_GETS(DHCPV6S_NAME, "pool", cfg->index, "", 0, "IAInterface", cfg->interface); | ||
|
|
@@ -594,7 +607,7 @@ | |
| static int get_active_lanif(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; | ||
|
|
@@ -616,7 +629,11 @@ | |
| 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; | ||
|
|
@@ -636,6 +653,13 @@ | |
|
|
||
| p = strtok(NULL, " "); | ||
| } | ||
| } | ||
| #endif | ||
| #if !defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(_ONESTACK_PRODUCT_REQ_) | ||
| #if defined(_ONESTACK_PRODUCT_REQ_) | ||
| if (!isFeatureSupportedInCurrentMode(FEATURE_IPV6_DELEGATION)) | ||
| #endif | ||
| { | ||
|
Comment on lines
+658
to
+662
|
||
| #else | ||
| /* Get active bridge count from PSM */ | ||
|
Comment on lines
+658
to
664
|
||
| if (!bus_handle) { | ||
|
|
@@ -706,6 +730,7 @@ | |
| } | ||
| /* Set active IPv6 instances */ | ||
| ifl_set_event( "ipv6_active_inst", active_if_list); | ||
| } | ||
| #endif | ||
|
|
||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -37,3 +37,6 @@ libCcspDhcpMgr_board_sbapi_la_CPPFLAGS = -I$(top_srcdir)/source/TR-181/include \ | |||||||||||
| libCcspDhcpMgr_board_sbapi_la_SOURCES = cosa_dhcpv6_apis.c cosa_dhcpv4_apis.c ../middle_layer_src/cosa_apis_util.c cosa_dhcpv4_webconfig_apis.c lan_webconfig_param.c macbinding_webconfig_param.c cosa_x_cisco_com_devicecontrol_apis.c | ||||||||||||
|
|
||||||||||||
| libCcspDhcpMgr_board_sbapi_la_LDFLAGS = -lccsp_common -lhal_moca -lulog -lsyscfg -lsysevent -ltime_conversion -llmapi -lwebconfig_framework -lmsgpackc -lcm_mgnt -lnanomsg | ||||||||||||
| if ONESTACK_PRODUCT_REQ | ||||||||||||
| libCcspDhcpMgr_board_sbapi_la_LDFLAGS += -ldevicemode -lonestack_syscfg -lonestack_log -lrdkb_feature_mode_gate | ||||||||||||
| endif | ||||||||||||
|
Comment on lines
39
to
+42
|
||||||||||||
| libCcspDhcpMgr_board_sbapi_la_LDFLAGS = -lccsp_common -lhal_moca -lulog -lsyscfg -lsysevent -ltime_conversion -llmapi -lwebconfig_framework -lmsgpackc -lcm_mgnt -lnanomsg | |
| if ONESTACK_PRODUCT_REQ | |
| libCcspDhcpMgr_board_sbapi_la_LDFLAGS += -ldevicemode -lonestack_syscfg -lonestack_log -lrdkb_feature_mode_gate | |
| endif | |
| libCcspDhcpMgr_board_sbapi_la_LDFLAGS = -lccsp_common -lhal_moca -lulog -lsyscfg -lsysevent -ltime_conversion -llmapi -lwebconfig_framework -lmsgpackc -lcm_mgnt -lnanomsg -ldevicemode -lonestack_syscfg -lonestack_log -lrdkb_feature_mode_gate |
Uh oh!
There was an error while loading. Please reload this page.