Skip to content

RDKCOM-5616: RDKBDEV-3470, RDKBACCL-1853: SSH and WebUI not working - Ethernet Configurable WAN - #435

Open
anatar818 wants to merge 19 commits into
developfrom
anatar818-patch-2
Open

anatar818 wants to merge 19 commits into
developfrom
anatar818-patch-2

Conversation

@anatar818

Copy link
Copy Markdown
Contributor

Ecm_wan_name is getting updated causing regression in XB devices

Reason for change: Verify configurable wan interface in BPI R4 (ethagent functionality)
Test Procedure: Build and flash the image ,Validate wan functionality for the customized interface name
Risks: None
Priority : P2

Copilot AI balanced review requested due to automatic review settings October 1, 2026 14:43
@anatar818
anatar818 requested review from a team as code owners October 1, 2026 14:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Skipping eCM interface initialization can generate malformed firewall rules and cause firewall restoration to fail.

Review effort: Balanced
Findings: 1 High severity

Open (1)
What changed in this PR

Updates firewall handling for configurable WAN interfaces to support customized interface names.

Changes:

  • Adds configurable-WAN fallback interface selection.
  • Uses the current WAN interface for Ethernet WAN SSH rules.
  • Conditionally skips loading the eCM WAN interface.
File Description
source/​firewall/​firewall.c Updates WAN interface initialization and SSH firewall rules.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread source/firewall/firewall.c Outdated
Removed conditional compilation for ecm_wan_ifname retrieval.
Copilot AI balanced review requested due to automatic review settings October 1, 2026 14:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Equivalent nftables paths remain unchanged, leaving configurable WAN and SSH broken when nftables is enabled.

Review effort: Balanced
Findings: None

Resolved since last review (1)
Previously missed (2)

In code that hasn't changed since last review

Medium severity nft backend ignores configured physical WAN interface

source/​firewall/​firewall.c:2389

This configurable-WAN fallback is only added to the iptables implementation. When nft_enable=1, firewall_log_handle.sh runs firewall_nft, whose prepare_globals_from_configuration() still falls back directly to wan_ifname/erouter0 (source/firewall_nft/firewall_nft.c:2328-2337) and never reads wan_physical_ifname. As a result, the customized interface is still absent from the generated nftables rules. Please mirror this initialization in the nft backend.

Medium severity nft backend breaks SSH on customized Ethernet WAN

source/​firewall/​firewall.c:12611

The SSH-interface correction also needs to be applied to the nft backend. In nft mode, the corresponding branch at source/firewall_nft/firewall_nft.c:11448-11458 still selects default_wan_ifname whenever it differs from current_wan_ifname, so SSH remains unavailable on a customized Ethernet WAN interface.

Copilot AI balanced review requested due to automatic review settings October 1, 2026 14:49
Removed unnecessary blank line in firewall.c

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The equivalent nftables path remains unchanged, so the regression persists when nft_enable=1.

Review effort: Balanced
Findings: 1 High severity

Open (1)

Comment on lines +2386 to +2389
#ifdef FEATURE_RDKB_CONFIGURABLE_WAN_INTERFACE
if ('\0' == current_wan_ifname[0]) {
char wanInterface[20] = {'\0'};
syscfg_get(NULL, "wan_physical_ifname", wanInterface, sizeof(wanInterface));
Copilot AI balanced review requested due to automatic review settings October 1, 2026 14:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

The equivalent nftables path remains unfixed when nft_enable=1.

Review effort: Balanced
Findings: 1 High severity

Open (1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants