RDKB-63098: [ONESTACK]-Handle IPv6 delegation for business vs residential Partner ID as part of single build#238
RDKB-63098: [ONESTACK]-Handle IPv6 delegation for business vs residential Partner ID as part of single build#238
Conversation
vs residential Partner ID as part of single build
Reason for change: Prefix delegation handling
Test Procedure:
- Build OneStack Image
- In Business-mode, Check dibbler server is started and server.conf
has prefix-delegation class
- In Residential-mode, check whether device behaves as a non-CBR device
Risks: None
Priority: P1
Signed-off-by: rirfha948 <rasina_irfhan@comcast.com>
eeb4f20 to
c2e4e85
Compare
There was a problem hiding this comment.
Pull request overview
Adds OneStack-aware IPv6 prefix delegation handling, toggling behavior between “business” (PD enabled) and “residential” (PD disabled) modes in a single build.
Changes:
- Gate PD-related routed/IPv6/firewall behavior at runtime via
rdkb_feature_mode_gate(FEATURE_IPV6_DELEGATION). - Register different sysevent custom events for business vs residential mode (including new
ipv6_prefix_delegationevent). - Update build/link integration to include OneStack libraries when
ONESTACK_PRODUCT_REQis enabled.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| source/util/utils/Makefile.am | Links OneStack feature/mode-gate libs when enabled |
| source/service_routed/service_routed.c | Runtime-gates PD vs non-PD code paths |
| source/service_routed/Makefile.am | Adds include/link flags and OneStack libs |
| source/service_ipv6/service_ipv6.c | Runtime-gates PD behavior; updates helper and start/stop logic |
| source/service_ipv6/Makefile.am | Links OneStack feature/mode-gate libs when enabled |
| source/scripts/init/service.d/service_routed_bci.sh | Adds ipv6_prefix_delegation event handling; expands model list |
| source/scripts/init/service.d/service_registration_functions.sh | Adds debug prints during event registration |
| source/scripts/init/service.d/service_dhcpv6_server_bci.sh | Adds ipv6_prefix_delegation event handling; expands model list |
| source/scripts/init/service.d/service_crond.sh | Expands model list for cron entry |
| source/scripts/init/c_registration/Makefile.am | Links OneStack feature/mode-gate libs when enabled |
| source/scripts/init/c_registration/20_routing.c | Chooses custom events list based on PD feature mode |
| source/scripts/init/c_registration/15_dhcpv6_server.c | Chooses custom events list based on PD feature mode |
| source/scripts/init/c_registration/15_dhcpv6_client.c | Enables client custom events under OneStack |
| source/firewall/firewall_ipv6.c | Runtime-gates multinet firewall rules under OneStack |
| source/firewall/firewall.h | Exposes multinet firewall prototype for OneStack builds |
| source/firewall/Makefile.am | Links OneStack feature/mode-gate libs when enabled |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "dhcpv6_server-stop|/etc/utopia/service.d/service_dhcpv6_server_bci.sh", | ||
| "dhcpv6_server-restart|/etc/utopia/service.d/service_dhcpv6_server_bci.sh", | ||
| "ipv6_prefix_delegation|/etc/utopia/service.d/service_dhcpv6_server_bci.sh", | ||
| "dhcpv6_option_changed|/etc/utopia/service.d/service_dhcpv6_server_bci.sh|NULL|"TUPLE_FLAG_EVENT,NULL |
There was a problem hiding this comment.
This array initializer is syntactically invalid: the final element combines a string literal and NULL without a separating comma, which will fail compilation. Split the last entry into a string element and a separate NULL terminator (and ensure the TUPLE_FLAG_EVENT concatenation remains part of the string literal).
| "dhcpv6_option_changed|/etc/utopia/service.d/service_dhcpv6_server_bci.sh|NULL|"TUPLE_FLAG_EVENT,NULL | |
| "dhcpv6_option_changed|/etc/utopia/service.d/service_dhcpv6_server_bci.sh|NULL|"TUPLE_FLAG_EVENT, | |
| NULL |
| #if defined(_ONESTACK_PRODUCT_REQ_) | ||
| const char** SERVICE_CUSTOM_EVENTS = NULL; |
There was a problem hiding this comment.
Under configurations where _ONESTACK_PRODUCT_REQ_ and CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION are both defined, this will produce a redefinition of SERVICE_CUSTOM_EVENTS with incompatible types (const char** vs const char* []). Refactor to define SERVICE_CUSTOM_EVENTS exactly once via a single #if / #elif / #else chain, and consider using const char* const *SERVICE_CUSTOM_EVENTS for the pointer form to preserve const-correctness.
| #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; |
| #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[] = { |
There was a problem hiding this comment.
This introduces the same potential symbol clash as in 20_routing.c: if _ONESTACK_PRODUCT_REQ_ is defined alongside another branch that defines SERVICE_CUSTOM_EVENTS[], compilation will fail due to redefinition. Prefer a single compile-time selection that declares SERVICE_CUSTOM_EVENTS once, and use a const-correct pointer type (const char* const *) when you need to re-point it at different static arrays.
| "routeset-ula|/usr/bin/service_routed|NULL|"TUPLE_FLAG_EVENT, | ||
| "routeunset-ula|/usr/bin//service_routed|NULL|"TUPLE_FLAG_EVENT, |
There was a problem hiding this comment.
The routeunset-ula handler path contains a double slash (/usr/bin//service_routed). While it may resolve on many systems, it’s an easy source of inconsistency and can break path comparisons/tools. Use /usr/bin/service_routed.
| #if defined( _CBR_PRODUCT_REQ_) || defined (_ONESTACK_PRODUCT_REQ_) | ||
| STATIC uint64_t helper_ntoh64(const long long unsigned int *inputval) |
There was a problem hiding this comment.
Changing the parameter type from const uint64_t * to const long long unsigned int * is not portable: uint64_t is not guaranteed to be unsigned long long on all toolchains, and this can introduce incompatible-pointer warnings/errors at call sites. Keep the parameter as const uint64_t * (or change to a byte-oriented type like const uint8_t */const void * since the implementation treats it as raw bytes).
|
|
||
| STATIC int serv_ipv6_stop(struct serv_ipv6 *si6) | ||
| { | ||
| fprintf(stderr, "Entered serv_ipv6_stop \n"); |
There was a problem hiding this comment.
These unconditional fprintf(stderr, ...) debug prints will spam logs in production and are inconsistent with the rest of the service logging patterns. Please gate them behind an existing debug macro/compile flag (or remove them) and use the project’s standard logging facility if available.
| fprintf(stderr, "Entered serv_ipv6_stop \n"); |
| return 0 | ||
| fi | ||
|
|
||
| echo "[DEBUG] sm_rm_event ${SMR_SERVICE} ${SMR_EVENT_NAME}" |
There was a problem hiding this comment.
These debug echo statements are unconditional and will add noise to boot/service manager logs on all devices. Consider guarding them behind a debug flag/environment variable (or using an existing structured logger like ulog if that’s the convention for this repo).
| echo "[DEBUG] sm_rm_event ${SMR_SERVICE} ${SMR_EVENT_NAME}" | |
| ulog srvmgr status "[DEBUG] sm_rm_event ${SMR_SERVICE} ${SMR_EVENT_NAME}" |
| IFS=';' | ||
| for custom in $SM_CUSTOM_EVENTS ; do | ||
| if [ -n "$custom" ] && [ " " != "$custom" ] ; then | ||
| echo "[DHCPV6][DEBUG] Registering custom event: '$custom' for service '$SM_SERVICE'" |
There was a problem hiding this comment.
These debug echo statements are unconditional and will add noise to boot/service manager logs on all devices. Consider guarding them behind a debug flag/environment variable (or using an existing structured logger like ulog if that’s the convention for this repo).
| echo "[DHCPV6][DEBUG] Registering custom event: '$custom' for service '$SM_SERVICE'" | |
| ulog dhcpv6 debug "Registering custom event: '$custom' for service '$SM_SERVICE'" |
| -I$(top_srcdir)/source/util/utils \ | ||
| $(DBUS_CFLAGS) | ||
|
|
||
| AM_LDFLAGS = -lsecure_wrapper -lccsp_common $(DBUS_LIBS) |
There was a problem hiding this comment.
These Makefile changes put libraries (-l...) into AM_LDFLAGS / service_routed_LDFLAGS. In Automake, *_LDFLAGS is intended for linker flags (e.g., -L, -Wl, options), while libraries should generally go into *_LDADD (or LIBS). Moving -lccsp_common, $(DBUS_LIBS), -lnet, and the OneStack libraries to service_routed_LDADD will avoid link-order issues and align with standard Automake conventions.
| 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 | ||
| service_routed_LDFLAGS += -lnet |
There was a problem hiding this comment.
These Makefile changes put libraries (-l...) into AM_LDFLAGS / service_routed_LDFLAGS. In Automake, *_LDFLAGS is intended for linker flags (e.g., -L, -Wl, options), while libraries should generally go into *_LDADD (or LIBS). Moving -lccsp_common, $(DBUS_LIBS), -lnet, and the OneStack libraries to service_routed_LDADD will avoid link-order issues and align with standard Automake conventions.
vs residential Partner ID as part of single build
Reason for change: Prefix delegation handling
Test Procedure:
- Build OneStack Image
- In Business-mode, Check dibbler server is started and server.conf
has prefix-delegation class
- In Residential-mode, check whether device behaves as a non-CBR device
Risks: None
Priority: P1
Signed-off-by: rirfha948 <rasina_irfhan@comcast.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 9 comments.
Comments suppressed due to low confidence (1)
source/service_routed/service_routed.c:1795
- Inconsistent indentation and formatting. The 'if' statement on line 1786 is not indented properly, and the variable declarations starting at line 1789 should follow standard C89/C90 convention of being declared at the beginning of the block (before any executable statements), or the code should be compiled with C99 or later standards. Consider adding proper indentation and following the code style of the surrounding context.
if (!isFeatureSupportedInCurrentMode(FEATURE_IPV6_DELEGATION))
#endif
{
char cmd[100];
char out[100];
char interface_name[32] = {0};
char *token = NULL;
char *pt;
char pref_rx[16];
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "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 |
There was a problem hiding this comment.
Inconsistent indentation in array. Line 70 uses a tab character while surrounding lines use spaces. This creates visual inconsistency and should be standardized to match the indentation style of the rest of the array.
| NULL | |
| NULL |
| 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_) |
There was a problem hiding this comment.
Missing space in the preprocessor directive condition. The code has '#if defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(ONESTACK_PRODUCT_REQ)' with two spaces after '||'. While this doesn't cause a compilation error, it's inconsistent with the single space used elsewhere in the file.
| DHCPV6S_SYSCFG_GETS(DHCPV6S_NAME, "pool", cfg->index, "", 0, "IAInterface", iface_name); | ||
| } | ||
| #endif | ||
| #if !defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(_ONESTACK_PRODUCT_REQ_) |
There was a problem hiding this comment.
Inconsistent spacing in preprocessor directive. This line has two spaces after '||' while other similar conditions use a single space. Consider using consistent spacing throughout.
| #if !defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(_ONESTACK_PRODUCT_REQ_) | |
| #if !defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) || defined(_ONESTACK_PRODUCT_REQ_) |
| if (isFeatureSupportedInCurrentMode(FEATURE_IPV6_DELEGATION) == false) | ||
| #endif | ||
| { | ||
| DHCPV6S_SYSCFG_GETS(DHCPV6S_NAME, "pool", cfg->index, "", 0, "Interface", iface_name); |
There was a problem hiding this comment.
Inconsistent indentation. This line uses a tab character for indentation while the surrounding code uses spaces. This creates visual inconsistency and can cause issues with different editor tab settings.
| DHCPV6S_SYSCFG_GETS(DHCPV6S_NAME, "pool", cfg->index, "", 0, "Interface", iface_name); | |
| DHCPV6S_SYSCFG_GETS(DHCPV6S_NAME, "pool", cfg->index, "", 0, "Interface", iface_name); |
| @@ -2098,10 +2125,17 @@ STATIC int serv_ipv6_start(struct serv_ipv6 *si6) | |||
| sysevent_set(si6->sefd, si6->setok, "service_ipv6-status", "starting", 0); | |||
|
|
|||
| /* Fix for IPv6 prefix not getting updated in dibbler server conf file on WAN mode change */ | |||
| #if defined(_CBR2_PRODUCT_REQ_) | |||
| #if defined(_CBR2_PRODUCT_REQ_) | |||
| sysevent_get(si6->sefd, si6->setok, "ipv6_prefix", si6->mso_prefix, sizeof(si6->mso_prefix)); | |||
| sysevent_set(si6->sefd, si6->setok, "ipv6_prefix-divided", "", 0); | |||
| #endif | |||
| #if defined(_ONESTACK_PRODUCT_REQ_) | |||
| if (isFeatureSupportedInCurrentMode(FEATURE_IPV6_DELEGATION)) | |||
| { | |||
| sysevent_get(si6->sefd, si6->setok, "ipv6_prefix_delegation", si6->mso_prefix, sizeof(si6->mso_prefix)); | |||
| sysevent_set(si6->sefd, si6->setok, "ipv6_prefix-divided", "", 0); | |||
| } | |||
| #endif | |||
|
|
|||
| /* | |||
| * Update MTU of all the enabled IPv6 instances | |||
| @@ -2118,13 +2152,22 @@ STATIC int serv_ipv6_start(struct serv_ipv6 *si6) | |||
| * 5) Send RA, start DHCPv6 server | |||
| */ | |||
| /* For CBR product the lan(brlan0) v6 address set is done as part of PandM process*/ | |||
| #if !defined(_CBR_PRODUCT_REQ_) && !defined(_BWG_PRODUCT_REQ_) | |||
| #if !defined(_CBR_PRODUCT_REQ_) && !defined(_BWG_PRODUCT_REQ_) && !defined(_ONESTACK_PRODUCT_REQ_) | |||
| if (lan_addr6_set(si6) !=0) { | |||
| fprintf(stderr, "assign IPv6 address for lan interfaces error!\n"); | |||
| sysevent_set(si6->sefd, si6->setok, "service_ipv6-status", "error", 0); | |||
| return -1; | |||
| } | |||
| #endif | |||
| #if defined (_ONESTACK_PRODUCT_REQ_) | |||
| if (!isFeatureSupportedInCurrentMode(FEATURE_IPV6_DELEGATION)){ | |||
| if (lan_addr6_set(si6) !=0) { | |||
| fprintf(stderr, "assign IPv6 address for lan interfaces error!\n"); | |||
| sysevent_set(si6->sefd, si6->setok, "service_ipv6-status", "error", 0); | |||
| return -1; | |||
| } | |||
| } | |||
| #endif | |||
|
|
|||
| //Intel Proposed RDKB Generic Bug Fix from XB6 SDK | |||
| /*start zebra*/ | |||
| @@ -2152,6 +2195,7 @@ STATIC int serv_ipv6_start(struct serv_ipv6 *si6) | |||
|
|
|||
| STATIC int serv_ipv6_stop(struct serv_ipv6 *si6) | |||
| { | |||
| fprintf(stderr, "Entered serv_ipv6_stop \n"); | |||
| if (!serv_can_stop(si6->sefd, si6->setok, "service_ipv6")) | |||
| return -1; | |||
|
|
|||
| @@ -2162,7 +2206,7 @@ STATIC int serv_ipv6_stop(struct serv_ipv6 *si6) | |||
| sysevent_set(si6->sefd, si6->setok, "service_ipv6-status", "error", 0); | |||
| return -1; | |||
| } | |||
| #if !defined(_CBR_PRODUCT_REQ_) && !defined(_BWG_PRODUCT_REQ_) | |||
| #if !defined(_CBR_PRODUCT_REQ_) && !defined(_BWG_PRODUCT_REQ_) && !defined(_ONESTACK_PRODUCT_REQ_) | |||
| del_addr6_flg = false; | |||
| if (lan_addr6_unset(si6) !=0) { | |||
| fprintf(stderr, "unset IPv6 address for lan interfaces error!\n"); | |||
| @@ -2171,6 +2215,18 @@ STATIC int serv_ipv6_stop(struct serv_ipv6 *si6) | |||
| return -1; | |||
| } | |||
| del_addr6_flg = true; | |||
| #endif | |||
| #if defined (_ONESTACK_PRODUCT_REQ_) | |||
| if (!isFeatureSupportedInCurrentMode(FEATURE_IPV6_DELEGATION)){ | |||
| del_addr6_flg = false; | |||
| if (lan_addr6_unset(si6) !=0) { | |||
| fprintf(stderr, "unset IPv6 address for lan interfaces error!\n"); | |||
| sysevent_set(si6->sefd, si6->setok, "service_ipv6-status", "error", 0); | |||
| del_addr6_flg = true; | |||
| return -1; | |||
| } | |||
| del_addr6_flg = true; | |||
| } | |||
| #endif | |||
| sysevent_set(si6->sefd, si6->setok, "service_ipv6-status", "stopped", 0); | |||
| return 0; | |||
| @@ -2219,12 +2275,28 @@ STATIC int serv_ipv6_init(struct serv_ipv6 *si6) | |||
| return -1; | |||
| #endif | |||
| } | |||
|
|
|||
| #if defined (_ONESTACK_PRODUCT_REQ_) | |||
| if (isFeatureSupportedInCurrentMode(FEATURE_IPV6_DELEGATION)) | |||
| { | |||
| sysevent_get(si6->sefd, si6->setok, "ipv6_prefix_delegation", si6->mso_prefix, sizeof(si6->mso_prefix)); | |||
| } | |||
| else | |||
| { | |||
| sysevent_get(si6->sefd, si6->setok, "ipv6_prefix", si6->mso_prefix, sizeof(si6->mso_prefix)); | |||
| } | |||
| #else | |||
| sysevent_get(si6->sefd, si6->setok, "ipv6_prefix", si6->mso_prefix, sizeof(si6->mso_prefix)); | |||
| #endif | |||
| fprintf(stderr, "IPv6 Prefix :%s\n", si6->mso_prefix); | |||
| if (strlen(si6->mso_prefix)) | |||
| { | |||
| si6->wan_ready = true; | |||
| } | |||
| else | |||
| { | |||
| fprintf(stderr, "[%s] -- Init ipv6_prefix retrieval failed\n", PROG_NAME); | |||
| return -1; | |||
| } | |||
|
|
|||
| sysevent_get(si6->sefd, si6->setok, "erouter_topology-mode", buf, sizeof(buf)); | |||
| switch(atoi(buf)) { | |||
| @@ -2307,8 +2379,10 @@ int service_ipv6_main(int argc, char *argv[]) | |||
| } | |||
|
|
|||
| if (serv_ipv6_init(&si6) != 0) | |||
| { | |||
| fprintf(stderr, "[%s] -- Service IPV6 Initialization failed\n", PROG_NAME); | |||
| exit(1); | |||
|
|
|||
| } | |||
| for (i = 0; i < NELEMS(cmd_ops); i++) { | |||
| if (strcmp(argv[1], cmd_ops[i].cmd) != 0 || !cmd_ops[i].exec) | |||
| continue; | |||
| @@ -2323,6 +2397,7 @@ int service_ipv6_main(int argc, char *argv[]) | |||
| if (i == NELEMS(cmd_ops)) | |||
| fprintf(stderr, "[%s] unknown command: %s\n", PROG_NAME, argv[1]); | |||
|
|
|||
| fprintf(stderr, "[%s] -- DHCPv6 start in progress\n", PROG_NAME); | |||
There was a problem hiding this comment.
The debug fprintf statements added throughout this function should be removed or converted to proper logging. Debug print statements left in production code can impact performance and clutter logs. Consider using a conditional debug macro or removing these before merging.
| IFS=';' | ||
| for custom in $SM_CUSTOM_EVENTS ; do | ||
| if [ -n "$custom" ] && [ " " != "$custom" ] ; then | ||
| echo "[DHCPV6][DEBUG] Registering custom event: '$custom' for service '$SM_SERVICE'" |
There was a problem hiding this comment.
Debug echo statements are being added to shell scripts. These should be removed or made conditional before production deployment to avoid cluttering logs and potentially exposing sensitive information.
| echo "[DHCPV6][DEBUG] Registering custom event: '$custom' for service '$SM_SERVICE'" |
| #if defined (_COSA_BCM_MIPS_) | ||
| #if defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION) | ||
| // For CBR platform, the captive portal redirection feature was removed | ||
| // inWifiCp = 1; | ||
| #else | ||
| inWifiCp = 1; | ||
| inWifiCp = 1; | ||
| #endif | ||
| #else | ||
| inWifiCp = 1; | ||
| inWifiCp = 1; | ||
| #endif | ||
| } | ||
| } |
There was a problem hiding this comment.
Inconsistent indentation: this code block uses tab characters while the surrounding code may use spaces. The lines 1491-1501 should use consistent indentation matching the rest of the file to maintain code style uniformity.
| #ifdef WAN_FAILOVER_SUPPORTED | ||
| "routeset-ula|/usr/bin/service_routed|NULL|"TUPLE_FLAG_EVENT, | ||
| "routeunset-ula|/usr/bin//service_routed|NULL|"TUPLE_FLAG_EVENT, | ||
| #endif | ||
| NULL |
There was a problem hiding this comment.
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.
88076ef to
0443b75
Compare
| #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_) | ||
| int prepare_ipv6_multinet(FILE *fp) |
There was a problem hiding this comment.
why static was removed?
| 15_hotspot_SOURCES = 15_hotspot.c | ||
| endif | ||
| if ONESTACK_PRODUCT_REQ | ||
| LDFLAGS += -lrdkb_feature_mode_gate -ldevicemode |
There was a problem hiding this comment.
Is the -ldevicemode library required?
|
|
||
|
|
||
| if [ "$MODEL_NUM" = "DPC3941B" ] || [ "$MODEL_NUM" = "DPC3939B" ] || [ "$MODEL_NUM" = "CGA4131COM" ] || [ "$MODEL_NUM" = "CGA4332COM" ]; then | ||
| if [ "$MODEL_NUM" = "DPC3941B" ] || [ "$MODEL_NUM" = "DPC3939B" ] || [ "$MODEL_NUM" = "CGA4131COM" ] || [ "$MODEL_NUM" = "CGA4332COM" ] || [ "$MODEL_NUM" = "SG417DBCT" ]; then |
There was a problem hiding this comment.
Only Sercomm XB10 has been added here. How about Vantiva XB10? Also are we going with "model" based approach or "onestack feature" related approach?
| case "$1" in | ||
| "${SERVICE_NAME}-start") | ||
| if [ "$MODEL_NUM" = "DPC3941B" ] || [ "$MODEL_NUM" = "DPC3939B" ] || [ "$MODEL_NUM" = "CGA4131COM" ] || [ "$MODEL_NUM" = "CGA4332COM" ]; then | ||
| if [ "$MODEL_NUM" = "DPC3941B" ] || [ "$MODEL_NUM" = "DPC3939B" ] || [ "$MODEL_NUM" = "CGA4131COM" ] || [ "$MODEL_NUM" = "CGA4332COM" ] || [ "$MODEL_NUM" = "SG417DBCT" ]; then |
There was a problem hiding this comment.
| ;; | ||
| "${SERVICE_NAME}-stop") | ||
| if [ "$MODEL_NUM" = "DPC3941B" ] || [ "$MODEL_NUM" = "DPC3939B" ] || [ "$MODEL_NUM" = "CGA4131COM" ] || [ "$MODEL_NUM" = "CGA4332COM" ]; then | ||
| if [ "$MODEL_NUM" = "DPC3941B" ] || [ "$MODEL_NUM" = "DPC3939B" ] || [ "$MODEL_NUM" = "CGA4131COM" ] || [ "$MODEL_NUM" = "CGA4332COM" ] || [ "$MODEL_NUM" = "SG417DBCT" ]; then |
There was a problem hiding this comment.
| } | ||
|
|
||
| STATIC uint64_t helper_hton64(const uint64_t *inputval) | ||
| STATIC uint64_t helper_hton64(const long long unsigned int *inputval) |
There was a problem hiding this comment.
| AM_LDFLAGS = -lsecure_wrapper | ||
| AM_CPPFLAGS = -I$(top_srcdir)/source/include \ | ||
| -I$(top_srcdir)/source/util/utils \ | ||
| $(DBUS_CFLAGS) |
There was a problem hiding this comment.
Are these changes mandatory?
| -ltelemetry_msgsender | ||
| 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 |
There was a problem hiding this comment.
Do we need all these libraries
| #ifdef CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION | ||
|
|
||
| #ifdef WAN_FAILOVER_SUPPORTED | ||
| char last_broadcasted_prefix[64] = {0}; |
There was a problem hiding this comment.
why is this variable moved here?
There was a problem hiding this comment.
faced issue by introducing {}. Scope error. Example:
int function()
{
#if defined(BUSINESS_FEATURE) || defined(ONESTACK_PRODUCT_REQ)
if (business_mode)
{
int a = 0; // now inside block
a = 5;
}
#endif
printf("%d\n", a); // :x: COMPILER ERROR, Variable lives only inside block
return 0;
}
| libutopiautil_la_LDFLAGS = -lccsp_common $(DBUS_LIBS) | ||
|
|
||
| if ONESTACK_PRODUCT_REQ | ||
| libutopiautil_la_LDFLAGS += -ldevicemode -lonestack_syscfg -lonestack_log -lrdkb_feature_mode_gate |
There was a problem hiding this comment.
Do we need all these libs?
Reason for change: Prefix delegation handling
Test Procedure:
Build OneStack Image
In Business-mode, Check dibbler server is started and server.conf has prefix-delegation class
In Residential-mode, check whether device behaves as a non-CBR device Risks: None
Priority: P1
Is this a User Story (US)?
Have all dependent PRs from other components been listed ?
RDKB-63098-changes.xlsx
Does the commit message include both the User Story ticket and the Subtask ticket?
Will be all changes related to the User Story squashed and merged in a single commit?
Has the PR been raised only after completing all changes for the User Story (no partial changes)?
Has code development for the User Story been completed?
If yes, has the Gerrit topic or list of all dependent PRs across components (including meta-layer changes) been shared?
Is there a validation log available in the Jira ticket for verifying builds with the updated generic-srcrev.inc across all platforms?
RDKB-63098-logs.txt