Skip to content

Conversation

@S-Parthiban-Selvaraj
Copy link
Contributor

@S-Parthiban-Selvaraj S-Parthiban-Selvaraj commented Nov 15, 2024

This PR moves WAN IPv6 configuration from the LAN bridge to the WAN interface itself, addressing an issue where IANA is not assigned by the BNG (Broadband Network Gateway). The changes enable the creation of IPv6 addresses on WAN interfaces from delegated prefixes when IANA addresses are not provided.

Key changes:

Removed IPv6 configuration from LAN bridge and moved it to WAN interfaces
Added new function to construct WAN IPv6 addresses from IAPD (IA Prefix Delegation)
Updated IPv6 utility functions to work with virtual interfaces instead of interface names
Cleaned up LAN-specific IPv6 handling code and legacy bridge mode logic

This PR is dependent on the following related PRs:
rdkcentral/telco-voice-manager#5
rdkcentral/utopia#69
#79
rdkcentral/provisioning-and-management#127

S-Parthiban-Selvaraj and others added 30 commits July 16, 2024 14:26
Reason for change:  Solving Build errors

Test Procedure:
    Updated in Jira.

Risks: none
Priority: P1

Signed-off-by: parthiban.selvaraj <[email protected]>
Signed-off-by: parthiban.selvaraj <[email protected]>
Signed-off-by: parthiban.selvaraj <[email protected]>
Signed-off-by: Parthiban Selvaraj <[email protected]>
Signed-off-by: Parthiban Selvaraj <[email protected]>
Signed-off-by: S-Parthiban-Selvaraj <[email protected]>
Signed-off-by: Parthiban Selvaraj <[email protected]>
Signed-off-by: S-Parthiban-Selvaraj <[email protected]>
Signed-off-by: S-Parthiban-Selvaraj <[email protected]>
Fixing Virtual interface name set.

Signed-off-by: S-Parthiban-Selvaraj <[email protected]>
…ive VISM for products use the same default name for all interfaces

Signed-off-by: Parthiban Selvaraj <[email protected]>
@S-Parthiban-Selvaraj S-Parthiban-Selvaraj changed the base branch from feature-MAPT-Unification to main January 13, 2025 11:39
@S-Parthiban-Selvaraj S-Parthiban-Selvaraj changed the title RDKB-50962 : This is the change to create WAN ipv6 address from the delegated pref… RDKB-58910 : Move the WAN IPV6 configuration from LAN bridge Jun 6, 2025
LakshminarayananShenbagaraj pushed a commit that referenced this pull request Aug 19, 2025
New Tags:

https://github.com/rdkcentral/RdkWanManager/releases/tag/v2.7.0

What's Changed
RDKCOM-5173 REFPLTB-3128: [TDK][AUTO][RPI4][CELLULAR MANAGER] Switching back to ethwan from cellular mode not working as expected by @ksaipr036
RDKB-57254 : MAP-T Unification by @S-Parthiban-Selvaraj in

Signed-off-by: Parthiban Selvaraj <[email protected]>
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 PR moves WAN IPv6 configuration from the LAN bridge to the WAN interface itself, addressing an issue where IANA is not assigned by the BNG (Broadband Network Gateway). The changes enable the creation of IPv6 addresses on WAN interfaces from delegated prefixes when IANA addresses are not provided.

Key changes:

  • Removed IPv6 configuration from LAN bridge and moved it to WAN interfaces
  • Added new function to construct WAN IPv6 addresses from IAPD (IA Prefix Delegation)
  • Updated IPv6 utility functions to work with virtual interfaces instead of interface names
  • Cleaned up LAN-specific IPv6 handling code and legacy bridge mode logic

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
wanmgr_sysevents.h Removed LAN sync support structures and duplicate sysevent registrations
wanmgr_sysevents.c Cleaned up LAN state variables and duplicate sysevent handling
wanmgr_net_utils.h/c Refactored IPv6 utility function to use virtual interface pointer
wanmgr_ipc.h/c Updated IHC messaging to use virtual interface structure
wanmgr_interface_sm.c Major refactoring of IPv6 address handling and state management
wanmgr_dhcpv6_apis.h/c Added new function to construct WAN addresses from IAPD
wanmgr_dhcp_event_handler.c Updated to use new IPv6 utility functions
dhcpv6c_msg_apis.c Added validation for prefix assignment
wanmgr_rdkbus_common.h Removed obsolete bridge interface definition
Comments suppressed due to low confidence (1)

source/WanManager/wanmgr_dhcpv6_apis.c:1

  • This condition appears incorrect. It checks for neither address nor prefix assigned, but the comment suggests it should handle the case where only IAPD is received. The condition should be !pDhcpv6Data->addrAssigned && pDhcpv6Data->prefixAssigned.
/*

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines 621 to 622
sysevent_set_options(sysevent_msg_fd, sysevent_msg_token, SYSEVENT_IPV6_TOGGLE, TUPLE_FLAG_EVENT);
sysevent_setnotification(sysevent_msg_fd, sysevent_msg_token, SYSEVENT_IPV6_TOGGLE, &default_route_change_event_asyncid);
Copy link

Copilot AI Sep 18, 2025

Choose a reason for hiding this comment

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

Duplicate sysevent registration for SYSEVENT_IPV6_TOGGLE. Lines 618-619 are identical to lines 621-622 and should be removed.

Suggested change
sysevent_set_options(sysevent_msg_fd, sysevent_msg_token, SYSEVENT_IPV6_TOGGLE, TUPLE_FLAG_EVENT);
sysevent_setnotification(sysevent_msg_fd, sysevent_msg_token, SYSEVENT_IPV6_TOGGLE, &default_route_change_event_asyncid);

Copilot uses AI. Check for mistakes.
snprintf(pVirtIf->IP.Ipv6Data.pdIfAddress, sizeof(pVirtIf->IP.Ipv6Data.pdIfAddress), "%s/64", set_value); // concatenate prefix address with length "/64"
syscfg_set_string(SYSCFG_FIELD_IPV6_PREFIX_ADDRESS, pVirtIf->IP.Ipv6Data.pdIfAddress);
sysevent_set(sysevent_fd, sysevent_token, SYSEVENT_FIELD_TR_BRLAN0_DHCPV6_SERVER_ADDRESS, set_value, 0);
syscfg_set_string(SYSCFG_FIELD_IPV6_PREFIX_ADDRESS, pVirtIf->IP.Ipv6Data.address);
Copy link

Copilot AI Sep 18, 2025

Choose a reason for hiding this comment

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

This should use pVirtIf->IP.Ipv6Data.pdIfAddress instead of pVirtIf->IP.Ipv6Data.address to match the prefix address format with /64 suffix that was just set on line 2091.

Suggested change
syscfg_set_string(SYSCFG_FIELD_IPV6_PREFIX_ADDRESS, pVirtIf->IP.Ipv6Data.address);
syscfg_set_string(SYSCFG_FIELD_IPV6_PREFIX_ADDRESS, pVirtIf->IP.Ipv6Data.pdIfAddress);

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants