Skip to content

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

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

RDKCOM-5616: RDKBDEV-3470, RDKBACCL-1853: SSH and WebUI not working - Ethernet Configurable WAN I…#363
anatar818 wants to merge 6 commits into
developfrom
anatar818-patch-2

Conversation

@anatar818

@anatar818 anatar818 commented Jul 7, 2026

Copy link
Copy Markdown

RDKBACCL-1853 SSH and WebUI not working - Ethernet Configurable WAN Interface Integration

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

…nterface Integration

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
Copilot AI review requested due to automatic review settings July 7, 2026 08:00
@anatar818
anatar818 requested review from a team as code owners July 7, 2026 08:00

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.

Pull request overview

This PR aims to restore SSH/WebUI accessibility when the WAN interface name is configurable (e.g., on BPI R4), by ensuring firewall logic uses the correct WAN interface name when generating iptables rules.

Changes:

  • When FEATURE_RDKB_CONFIGURABLE_WAN_INTERFACE is enabled, initialize current_wan_ifname from syscfg (wan_physical_ifname) if sysevent doesn’t provide it.
  • When ETH WAN is enabled, generate the SSH filter iptables rule using current_wan_ifname (when set) under the configurable-WAN feature flag.

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

Comment thread source/firewall/firewall.c Outdated
Copilot AI review requested due to automatic review settings July 15, 2026 09:58

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.

Pull request overview

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

Comment thread source/firewall/firewall.c
Comment thread source/firewall/firewall.c
Copilot AI review requested due to automatic review settings July 17, 2026 08:05

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.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread source/firewall/firewall.c
snayak002c
snayak002c previously approved these changes Jul 20, 2026
@anatar818 anatar818 changed the title RDKBACCL-1853 SSH and WebUI not working - Ethernet Configurable WAN I… RDKDEV-1455,RDKBACCL-1853 SSH and WebUI not working - Ethernet Configurable WAN I… Jul 21, 2026
@pradeeptakdas pradeeptakdas changed the title RDKDEV-1455,RDKBACCL-1853 SSH and WebUI not working - Ethernet Configurable WAN I… RDKCOM-5616: RDKBDEV-3470, RDKBACCL-1853 SSH and WebUI not working - Ethernet Configurable WAN I… Jul 21, 2026
@AkhilaReddyK7 AkhilaReddyK7 changed the title RDKCOM-5616: RDKBDEV-3470, RDKBACCL-1853 SSH and WebUI not working - Ethernet Configurable WAN I… RDKCOM-5616: RDKBDEV-3470 SSH and WebUI not working - Ethernet Configurable WAN I… Jul 23, 2026
@AkhilaReddyK7 AkhilaReddyK7 changed the title RDKCOM-5616: RDKBDEV-3470 SSH and WebUI not working - Ethernet Configurable WAN I… RDKCOM-5616: RDKBDEV-3470, RDKBACCL-1853: SSH and WebUI not working - Ethernet Configurable WAN I… Jul 23, 2026
@AkhilaReddyK7

Copy link
Copy Markdown

Builds generated at https://gerrit.teamccp.com/#/c/962410/

Copilot AI review requested due to automatic review settings July 23, 2026 14:16
@pradeeptakdas

Copy link
Copy Markdown

Based on @manigandanj input wanInterface buf size changed from BUFLEN_64 to 20 bytes in source/firewall/firewall.c to fix the build issue.

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.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

source/firewall/firewall.c:2390

  • In the configurable-WAN branch, if both current_wan_ifname and default_wan_ifname are empty and wan_physical_ifname is not set, the code leaves current_wan_ifname/ecm_wan_ifname empty. That can generate invalid iptables rules elsewhere (e.g., "-i -p tcp ..."). The non-configurable path avoids this by falling back to "erouter0"; the configurable path should keep an equivalent fallback and can simplify by always deriving ecm_wan_ifname from the final current_wan_ifname.
    if ('\0' == current_wan_ifname[0]) {
	  char wanInterface[20] = {'\0'};	
      syscfg_get(NULL, "wan_physical_ifname", wanInterface, sizeof(wanInterface));
	  if(wanInterface[0] != '\0'){     
        snprintf(current_wan_ifname, sizeof(current_wan_ifname), "%s", wanInterface);

Copilot AI review requested due to automatic review settings July 24, 2026 07:51

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.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

source/firewall/firewall.c:2399

  • In the configurable-WAN path, when wan_physical_ifname is empty you copy default_wan_ifname into ecm_wan_ifname using sizeof(current_wan_ifname). ecm_wan_ifname is a smaller buffer (20 bytes), so this passes an incorrect destmax to strcpy_s and can lead to overflow/constraint violations. Also, the legacy fallback to "erouter0" when default_wan_ifname is empty is skipped under this feature flag, leaving WAN ifnames empty.
      else{
		 safec_rc=strcpy_s(current_wan_ifname, sizeof(current_wan_ifname),default_wan_ifname); 
		 ERR_CHK(safec_rc);
		 safec_rc=strcpy_s(ecm_wan_ifname, sizeof(ecm_wan_ifname),default_wan_ifname);  
		 ERR_CHK(safec_rc);

Comment on lines +2402 to +2405
else {
safec_rc=strcpy_s(ecm_wan_ifname, sizeof(current_wan_ifname),current_wan_ifname);
ERR_CHK(safec_rc);
}
Copilot AI review requested due to automatic review settings July 24, 2026 07:54

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.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

source/firewall/firewall.c:2400

  • Under FEATURE_RDKB_CONFIGURABLE_WAN_INTERFACE, when sysevent "current_wan_ifname" is empty and syscfg "wan_physical_ifname" is also empty, this falls back to copying default_wan_ifname even when it is empty. This removes the previous (non-feature) fallback to "erouter0" and can leave current_wan_ifname/ecm_wan_ifname empty, which later generates invalid iptables rules (e.g., "-i " with no interface).
		 safec_rc=strcpy_s(current_wan_ifname, sizeof(current_wan_ifname),default_wan_ifname); 
		 ERR_CHK(safec_rc);
		 safec_rc=strcpy_s(ecm_wan_ifname, sizeof(ecm_wan_ifname),default_wan_ifname);  
		 ERR_CHK(safec_rc);
	  }	  

@AkhilaReddyK7 AkhilaReddyK7 added the community-contribution Contribution from community label Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Contribution from community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants