-
Notifications
You must be signed in to change notification settings - Fork 42
RDKB-63098: Handle IPv6 delegation for business vs residential Partner ID as part of single build #215
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 #215
Changes from 10 commits
349c745
b70d5a5
be65456
43bac50
b61e2e1
6870c72
031c75c
45741d6
4a090a1
036eeff
39458cc
289bdf7
5ce4966
e40b2b3
c822023
02f2715
3f6daad
5b81add
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,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
|
||
| * following copyright and licenses apply: | ||
| * | ||
| * Copyright 2015 RDK Management | ||
|
|
@@ -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]; | ||
|
|
@@ -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; | ||
|
|
@@ -1705,9 +1714,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 | ||
|
Comment on lines
+1719
to
+1727
|
||
| char active_insts[32] = {0}; | ||
| char lan_pd_if[128] = {0}; | ||
| char *p = NULL; | ||
|
Comment on lines
+1719
to
1730
|
||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,4 +1,4 @@ | ||||||
| /************************************************************************************ | ||||||
|
Check failure on line 1 in source/service_ipv6/service_ipv6.c
|
||||||
| If not stated otherwise in this file or this component's Licenses.txt file the | ||||||
| following copyright and licenses apply: | ||||||
|
|
||||||
|
|
@@ -53,6 +53,9 @@ | |||||
| #include "ccsp_memory.h" | ||||||
| #endif | ||||||
|
|
||||||
| #ifdef _ONESTACK_PRODUCT_REQ_ | ||||||
| #include <rdkb_feature_mode_gate.h> | ||||||
| #endif | ||||||
| #ifdef _HUB4_PRODUCT_REQ_ | ||||||
| #include "ccsp_dm_api.h" | ||||||
| #include "ccsp_custom.h" | ||||||
|
|
@@ -391,10 +394,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 | ||||||
| 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(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(_ONESTACK_PRODUCT_REQ_) | |
| #if defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(_ONESTACK_PRODUCT_REQ_) |
Copilot
AI
Feb 19, 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.
Inconsistent boolean comparison style: This explicit comparison with 'true' is inconsistent with other calls to isFeatureSupportedInCurrentMode() in this PR. For example, line 647 in service_routed.c omits the '== true'. For consistency, either use the explicit comparison everywhere or omit it everywhere. If the function returns a boolean type, the explicit comparison is redundant.
Copilot
AI
Feb 17, 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.
New ONESTACK runtime gating changes which syscfg key is read (IAInterface vs Interface), but the unit tests under source/test/service_ipv6 don’t appear to cover the ONESTACK path. Please add tests that mock isFeatureSupportedInCurrentMode() for both enabled/disabled and verify the expected DHCPV6S_SYSCFG_GETS key is used.
Copilot
AI
Feb 19, 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.
Inconsistent spacing in preprocessor directive: There are two spaces between '||' and 'defined(ONESTACK_PRODUCT_REQ)'. For consistency with other preprocessor directives in the codebase, use a single space.
| #if !defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(_ONESTACK_PRODUCT_REQ_) | |
| #if !defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(_ONESTACK_PRODUCT_REQ_) |
Copilot
AI
Feb 19, 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.
Inconsistent boolean comparison style: This explicit comparison with 'false' is inconsistent with other calls to isFeatureSupportedInCurrentMode() in this PR. For example, line 462 in service_routed.c uses the negation operator '!'. For consistency, use the negation operator '!' instead of explicit comparison with 'false'.
| if (isFeatureSupportedInCurrentMode(FEATURE_IPV6_DELEGATION) == false) | |
| if (!isFeatureSupportedInCurrentMode(FEATURE_IPV6_DELEGATION)) |
Copilot
AI
Feb 19, 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.
Inconsistent indentation: This line uses a tab character for indentation instead of spaces. The surrounding code uses spaces (4 spaces per indentation level). Replace the tab with spaces for consistency.
| DHCPV6S_SYSCFG_GETS(DHCPV6S_NAME, "pool", cfg->index, "", 0, "Interface", iface_name); | |
| DHCPV6S_SYSCFG_GETS(DHCPV6S_NAME, "pool", cfg->index, "", 0, "Interface", iface_name); |
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.
ONESTACK-specific behavior is now introduced in get_dhcpv6s_pool_cfg() to choose between IAInterface vs Interface based on FEATURE_IPV6_DELEGATION, but the existing service_ipv6 unit tests don’t build with ONESTACK_PRODUCT_REQ and don’t validate either branch. Add unit tests that exercise both feature states (mocking isFeatureSupportedInCurrentMode) to ensure the correct syscfg key is read.
Copilot
AI
Feb 17, 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.
get_active_lanif() now adds ONESTACK-specific runtime branching based on FEATURE_IPV6_DELEGATION. The existing service_ipv6 unit tests don’t appear to cover this new feature-gated behavior; please add tests for ONESTACK builds that exercise both branches (feature enabled vs disabled) and assert the expected sysevent/syscfg calls.
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.
Inconsistent boolean comparison style: This explicit comparison with 'true' is inconsistent with other calls to isFeatureSupportedInCurrentMode() in this PR. For example, line 433 in service_routed.c omits the '== true'. For consistency, either use the explicit comparison everywhere or omit it everywhere. If the function returns a boolean type, the explicit comparison is redundant.