Skip to content

RDKB-63624 Handle static ip for Firewall, OneToOneNAT and Static Routing#240

Merged
hpatel006c merged 3 commits intodevelopfrom
feature/onestack_fwtsip
Feb 24, 2026
Merged

RDKB-63624 Handle static ip for Firewall, OneToOneNAT and Static Routing#240
hpatel006c merged 3 commits intodevelopfrom
feature/onestack_fwtsip

Conversation

@schira267
Copy link
Contributor

@schira267 schira267 commented Feb 24, 2026

US: RDKB-63097: Subtask: RDKB-63624 Handle static ip for Firewall, OneToOneNAT and Static Routing

Reason for change: Add changes ensure that code is unblocked in OneStack case and only enabled as needed in business and non business scenarios as needed.

Test Procedure: Build with OneStack distro and test
Risks: None

  1. Is this a Bug or a User Story (US)?: US: RDKB-63097 [XB10] Handle static IPv4 configuration for business Partner ID. Subtask: RDKB-63624
  2. If it is a User Story:
    • Gerrit topic or list of all dependent PRs across components (including meta-layer changes) been shared?:
    topic: https://gerrit.teamccp.com/#/c/947813/
    RDKB-63624 Handle static ip for Firewall, OneToOneNAT and Static Routing provisioning-and-management#218

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for handling static IP configuration in OneStack builds by introducing conditional logic based on device mode (business vs non-business). The changes ensure that static IP-related code paths are properly gated for OneStack products while maintaining backward compatibility with existing CISCO_CONFIG_TRUE_STATIC_IP builds.

Changes:

  • Added runtime device mode checks for OneStack builds to differentiate between business and non-business scenarios
  • Updated build configuration to link required OneStack libraries
  • Modified static IP and NAT configuration logic to support OneStack's dual-mode operation

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 9 comments.

File Description
source/firewall/firewall.c Added conditional compilation blocks with runtime device mode checks to handle static IP configuration differently for OneStack business vs non-business modes
source/firewall/Makefile.am Added linker flags for OneStack-specific libraries (devicemode, onestack_syscfg, onestack_log) when ONESTACK_PRODUCT_REQ is enabled

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


#ifdef CISCO_CONFIG_TRUE_STATIC_IP
#if defined(CISCO_CONFIG_TRUE_STATIC_IP) || defined(_ONESTACK_PRODUCT_REQ_)
#ifdef _ONESTACK_PRODUCT_REQ_
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent indentation. The nested '#ifdef' directive should align with the outer '#if' directive at the same column position, or use consistent indentation throughout the file for nested preprocessor directives. The current indentation with leading spaces makes the preprocessor directive structure unclear.

Copilot uses AI. Check for mistakes.
isFWTS_enable = (0 == strcmp("1", firewall_true_static_ip_enable) ? 1 : 0);

#else
}
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing whitespace detected. Line ends with unnecessary whitespace characters that should be removed.

Suggested change
}
}

Copilot uses AI. Check for mistakes.
#ifdef CISCO_CONFIG_TRUE_STATIC_IP
#if defined(CISCO_CONFIG_TRUE_STATIC_IP) || defined(_ONESTACK_PRODUCT_REQ_)
#ifdef _ONESTACK_PRODUCT_REQ_
if(is_devicemode_business())
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after 'if' keyword. The code style in the surrounding context consistently uses a space between 'if' and the opening parenthesis (e.g., lines 2554, 2547, 2595). This should be 'if (is_devicemode_business())' for consistency.

Suggested change
if(is_devicemode_business())
if (is_devicemode_business())

Copilot uses AI. Check for mistakes.
#endif
#if !defined(CISCO_CONFIG_TRUE_STATIC_IP) || defined(_ONESTACK_PRODUCT_REQ_)
#ifdef _ONESTACK_PRODUCT_REQ_
if(!is_devicemode_business())
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after 'if' keyword. The code style in the surrounding context consistently uses a space between 'if' and the opening parenthesis. This should be 'if (!is_devicemode_business())' for consistency.

Copilot uses AI. Check for mistakes.
#ifdef CISCO_CONFIG_TRUE_STATIC_IP
#if defined(CISCO_CONFIG_TRUE_STATIC_IP) || defined(_ONESTACK_PRODUCT_REQ_)
#ifdef _ONESTACK_PRODUCT_REQ_
if(is_devicemode_business())
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after 'if' keyword. The code style in the surrounding context consistently uses a space between 'if' and the opening parenthesis. This should be 'if (is_devicemode_business())' for consistency.

Copilot uses AI. Check for mistakes.
#endif
#if !defined(CISCO_CONFIG_TRUE_STATIC_IP) || defined(_ONESTACK_PRODUCT_REQ_)
#ifdef _ONESTACK_PRODUCT_REQ_
if(!is_devicemode_business())
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after 'if' keyword. The code style in the surrounding context consistently uses a space between 'if' and the opening parenthesis. This should be 'if (!is_devicemode_business())' for consistency.

Copilot uses AI. Check for mistakes.
}
#endif
#if !defined(CISCO_CONFIG_TRUE_STATIC_IP) || defined(_ONESTACK_PRODUCT_REQ_)
#ifdef _ONESTACK_PRODUCT_REQ_
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent indentation. The nested '#ifdef' directive should align with the outer '#if' directive at the same column position, or use consistent indentation throughout the file for nested preprocessor directives. The current indentation with leading spaces makes the preprocessor directive structure unclear.

Copilot uses AI. Check for mistakes.
}
#endif
#if !defined(CISCO_CONFIG_TRUE_STATIC_IP) || defined(_ONESTACK_PRODUCT_REQ_)
#ifdef _ONESTACK_PRODUCT_REQ_
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent indentation. The nested '#ifdef' directive should align with the outer '#if' directive at the same column position, or use consistent indentation throughout the file for nested preprocessor directives. The current indentation with leading spaces makes the preprocessor directive structure unclear.

Copilot uses AI. Check for mistakes.
isNatEnabled = atoi(nat_enabled);
#ifdef CISCO_CONFIG_TRUE_STATIC_IP
#if defined(CISCO_CONFIG_TRUE_STATIC_IP) || defined(_ONESTACK_PRODUCT_REQ_)
#ifdef _ONESTACK_PRODUCT_REQ_
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent indentation. The nested '#ifdef' directive should align with the outer '#if' directive at the same column position, or use consistent indentation throughout the file for nested preprocessor directives. The current indentation with leading spaces makes the preprocessor directive structure unclear.

Copilot uses AI. Check for mistakes.
hpatel006c pushed a commit to rdkcentral/provisioning-and-management that referenced this pull request Feb 24, 2026
…ing (#218)

US: RDKB-63097: Subtask: RDKB-63624 Handle static ip for Firewall,
OneToOneNAT and Static Routing

Reason for change: Add changes to ensure that true static ip and
OneToOneNAT cannot be enabled for non business scenarios and that the
dml's are unblocked in code for OneStack case and only enabled in
business scenarios.

Test Procedure: Build with OneStack distro and test
Risks: None
1. Is this a Bug or a User Story (US)?: US: RDKB-63097 [XB10] Handle
static IPv4 configuration for business Partner ID. Subtask: RDKB-63624
2. If it is a User Story:
• Gerrit topic or list of all dependent PRs across components (including
meta-layer changes) been shared?
:topic: https://gerrit.teamccp.com/#/c/947813/
rdkcentral/utopia#240
@hpatel006c hpatel006c merged commit 5dd72c8 into develop Feb 24, 2026
9 of 11 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Feb 24, 2026
@schira267 schira267 deleted the feature/onestack_fwtsip branch February 27, 2026 08:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants