-
Notifications
You must be signed in to change notification settings - Fork 42
RDKB-63098: [ONESTACK]-Handle IPv6 delegation for business vs residential Partner ID as part of single build #238
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?
Changes from all commits
c2e4e85
a8c6b12
31e5822
0443b75
d979af5
bb5a727
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/scripts/init/c_registration/15_dhcpv6_server.c
|
||||||
| * following copyright and licenses apply: | ||||||
| * | ||||||
| * Copyright 2015 RDK Management | ||||||
|
|
@@ -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 | ||||||
|
|
||||||
| #if defined(_CBR_PRODUCT_REQ_) && !defined(_CBR2_PRODUCT_REQ_) | ||||||
| const char* SERVICE_CUSTOM_EVENTS[] = { | ||||||
|
Comment on lines
+45
to
50
|
||||||
| "dhcpv6_option_changed|/usr/bin/service_ipv6", | ||||||
|
|
@@ -47,11 +54,29 @@ | |||||
| "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 | ||||||
| }; | ||||||
| #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 | ||||||
|
||||||
| NULL | |
| NULL |
| 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
|
||||||||||
| * following copyright and licenses apply: | ||||||||||
| * | ||||||||||
| * Copyright 2015 RDK Management | ||||||||||
|
|
@@ -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
|
||||||||||
| #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
AI
Feb 27, 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 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
AI
Feb 27, 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.
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.
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.
For OneStack,
SERVICE_CUSTOM_EVENTSis declared as a pointer (const char**), but the file can also define aconst 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 soSERVICE_CUSTOM_EVENTSis defined exactly once per build.