-
Notifications
You must be signed in to change notification settings - Fork 5
RDKB-63098: Handle IPv6 delegation for business vs residential Partner ID as part of single build #25
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 #25
Changes from all commits
e4e0b9c
9f60143
781f678
054277e
0b2bc0c
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 | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -51,3 +51,6 @@ endif | |||||||
| if CORE_NET_LIB_FEATURE_SUPPORT | ||||||||
| CcspCMAgentSsp_LDFLAGS += -lnet | ||||||||
| endif | ||||||||
| if ONESTACK_PRODUCT_REQ | ||||||||
| CcspCMAgentSsp_LDFLAGS += -ldevicemode -lonestack_syscfg -lonestack_log -lrdkb_feature_mode_gate | ||||||||
|
||||||||
| CcspCMAgentSsp_LDFLAGS += -ldevicemode -lonestack_syscfg -lonestack_log -lrdkb_feature_mode_gate | |
| CcspCMAgentSsp_LDFLAGS += -ldevicemode -lonestack_syscfg -lonestack_log -lrdkb_feature_mode_gate | |
| CcspCMAgentSsp_CPPFLAGS += -D_ONESTACK_PRODUCT_REQ_ |
| 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/CMAgentSsp/gw_prov_abstraction.h
|
||
| * | ||
| * Copyright 2015 RDK Management | ||
| * | ||
|
|
@@ -205,7 +205,7 @@ | |
| typedef void (*fpDocsisRATransInterval)(unsigned short); | ||
| #endif | ||
| typedef void (*fpGW_Tr069PaSubTLVParse)(unsigned char type, unsigned short length, const unsigned char *value); | ||
| #ifdef CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION | ||
| #if defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(_ONESTACK_PRODUCT_REQ_) | ||
| typedef void (*fpGW_SetTopologyMode)(unsigned char type, unsigned short length, const unsigned char *value); | ||
| #endif | ||
|
|
||
|
|
@@ -227,7 +227,7 @@ | |
| fpDocsisRATransInterval pDocsis_GetRATransInterval; | ||
| #endif | ||
| fpGW_Tr069PaSubTLVParse pGW_Tr069PaSubTLVParse; | ||
| #if defined (CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) | ||
| #if defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(_ONESTACK_PRODUCT_REQ_) | ||
| fpGW_SetTopologyMode pGW_SetTopologyMode; | ||
| #endif | ||
|
Comment on lines
208
to
232
|
||
| }appCallBack; | ||
|
|
||
| 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/CMAgentSsp/gw_prov_sm.c
|
||||||||||||||||||||||||||||||||||||||
| * | ||||||||||||||||||||||||||||||||||||||
| * Copyright 2015 RDK Management | ||||||||||||||||||||||||||||||||||||||
| * | ||||||||||||||||||||||||||||||||||||||
|
|
@@ -85,6 +85,9 @@ | |||||||||||||||||||||||||||||||||||||
| #include "rdk_debug.h" | ||||||||||||||||||||||||||||||||||||||
| #endif | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| #ifdef _ONESTACK_PRODUCT_REQ_ | ||||||||||||||||||||||||||||||||||||||
| #include <rdkb_feature_mode_gate.h> | ||||||||||||||||||||||||||||||||||||||
| #endif | ||||||||||||||||||||||||||||||||||||||
| #include <mqueue.h> | ||||||||||||||||||||||||||||||||||||||
| //core net lib | ||||||||||||||||||||||||||||||||||||||
| #include <stdint.h> | ||||||||||||||||||||||||||||||||||||||
|
|
@@ -329,7 +332,7 @@ | |||||||||||||||||||||||||||||||||||||
| static void check_lan_wan_ready(); | ||||||||||||||||||||||||||||||||||||||
| //static TlvParseCallbackStatus_e gotEnableType(unsigned char type, unsigned short length, const unsigned char *value); | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| #ifdef CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION | ||||||||||||||||||||||||||||||||||||||
| #if defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(_ONESTACK_PRODUCT_REQ_) | ||||||||||||||||||||||||||||||||||||||
| static TlvParseCallbackStatusExtIf_e GW_setTopologyMode(unsigned char type, unsigned short length, const unsigned char *value); | ||||||||||||||||||||||||||||||||||||||
| #endif | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
|
|
@@ -1016,9 +1019,16 @@ | |||||||||||||||||||||||||||||||||||||
| #endif | ||||||||||||||||||||||||||||||||||||||
| #endif | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| #ifdef CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION | ||||||||||||||||||||||||||||||||||||||
| #if defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(_ONESTACK_PRODUCT_REQ_) | ||||||||||||||||||||||||||||||||||||||
| static TlvParseCallbackStatusExtIf_e GW_setTopologyMode(unsigned char type, unsigned short length, const unsigned char *value) | ||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||
| #ifdef _ONESTACK_PRODUCT_REQ_ | ||||||||||||||||||||||||||||||||||||||
| if (!isFeatureSupportedInCurrentMode(FEATURE_IPV6_DELEGATION)) | ||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||
| /* PD feature disabled — ignore TLV */ | ||||||||||||||||||||||||||||||||||||||
| return TLV_PARSE_CALLBACK_OK_EXTIF; | ||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+1025
to
+1030
|
||||||||||||||||||||||||||||||||||||||
| #endif | ||||||||||||||||||||||||||||||||||||||
| unsigned char tpMode = *value; | ||||||||||||||||||||||||||||||||||||||
| TlvParseCallbackStatusExtIf_e st = TLV_PARSE_CALLBACK_OK_EXTIF; | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
|
|
@@ -2162,8 +2172,13 @@ | |||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||
| CcspTraceError(("Removed file")); | ||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
| #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 | ||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||
| v_secure_system("sysevent set dhcpv6_client-stop"); | ||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
| #endif | ||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+2175
to
2183
|
||||||||||||||||||||||||||||||||||||||
| #if defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(_ONESTACK_PRODUCT_REQ_) | |
| #if defined(_ONESTACK_PRODUCT_REQ_) | |
| if (isFeatureSupportedInCurrentMode(FEATURE_IPV6_DELEGATION)) | |
| #endif | |
| { | |
| v_secure_system("sysevent set dhcpv6_client-stop"); | |
| } | |
| #endif | |
| } | |
| #if defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(_ONESTACK_PRODUCT_REQ_) | |
| #if defined(_ONESTACK_PRODUCT_REQ_) | |
| if (isFeatureSupportedInCurrentMode(FEATURE_IPV6_DELEGATION)) | |
| #endif | |
| { | |
| v_secure_system("sysevent set dhcpv6_client-stop"); | |
| } | |
| #endif | |
| } |
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.
RegisterDocsisCallback() allocates appCallBack with malloc() and does not zero-initialize it. With the new runtime gating, when IPv6 delegation is not supported pGW_SetTopologyMode is left uninitialized (garbage) instead of being set to NULL, which can lead to crashes if the state machine reads/calls it. Please ensure the struct is zeroed (e.g., calloc/memset) or explicitly set obj->pGW_SetTopologyMode = NULL in the non-supported path.
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.
When _ONESTACK_PRODUCT_REQ_ is defined but FEATURE_IPV6_DELEGATION is not supported, this block skips assigning obj->pGW_SetTopologyMode. Since obj is allocated with malloc (not zeroed), pGW_SetTopologyMode may contain an indeterminate value, which can lead to a crash/UB if the callback is invoked. Initialize the struct (e.g., zero-initialize or explicitly set pGW_SetTopologyMode = NULL in the non-supported path).
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 adds an Automake conditional for
ONESTACK_PRODUCT_REQ, but it is not wired to anyAC_ARG_ENABLE/AC_ARG_WITHorAC_DEFINEthat would propagate a corresponding C macro (e.g.,_ONESTACK_PRODUCT_REQ_) intoconfig.h/compile flags. If this repo is expected to control the feature viaconfigure, add a properAC_ARG_ENABLE(or similar) and anAC_DEFINEso the C sources and all dependent components can reliably compile the intended code paths.