Skip to content

RDKB-62645 : Observing IPv6 prefix delegation issues#173

Merged
guto86 merged 3 commits into
mainfrom
bugfix/prefixLengthIssue
Dec 4, 2025
Merged

RDKB-62645 : Observing IPv6 prefix delegation issues#173
guto86 merged 3 commits into
mainfrom
bugfix/prefixLengthIssue

Conversation

@S-Parthiban-Selvaraj
Copy link
Copy Markdown
Contributor

Reason for change: Fixing Prefix length issue for the for platforms that support prefix delegation to LAN clients.

Test Procedure:
Dibbler server should have pd-class if enabled.

Risks: none
Priority: P1

Reason for change:  Fixing Prefix length issue for the for platforms
that support prefix delegation to LAN clients.

Test Procedure:
Dibbler server should have pd-class if enabled.

Risks: none
Priority: P1

Signed-off-by: Parthiban Selvaraj <parthiban.selvaraj@sky.uk>
@S-Parthiban-Selvaraj S-Parthiban-Selvaraj requested a review from a team as a code owner December 4, 2025 13:26
Copilot AI review requested due to automatic review settings December 4, 2025 13:26
Copy link
Copy Markdown
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 fixes IPv6 prefix delegation issues for platforms supporting prefix delegation to LAN clients by using the delegated prefix length directly instead of hardcoding "/64".

Key Changes:

  • Adds conditional compilation blocks for CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION to override the hardcoded "/64" prefix length
  • Ensures the delegated prefix length from pVirtIf->IP.Ipv6Data.sitePrefix is used when the feature is enabled

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

Comment thread source/WanManager/wanmgr_dhcpv6_apis.c
Comment thread source/WanManager/wanmgr_dhcpv6_apis.c
Comment thread source/WanManager/wanmgr_dhcpv6_apis.c
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings December 4, 2025 17:44
Copy link
Copy Markdown
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

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


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

#if defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION)
/* Use the delegated prefix length directly for platforms that support prefix delegation to LAN clients */
strncpy(prefix, pVirtIf->IP.Ipv6Data.sitePrefix, sizeof(prefix) - 1);
#else
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

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

Missing null termination after strncpy. If pVirtIf->IP.Ipv6Data.sitePrefix is exactly sizeof(prefix) or longer, the resulting string may not be null-terminated. Add explicit null termination: prefix[sizeof(prefix) - 1] = '\0';

Suggested change
#else

Copilot uses AI. Check for mistakes.
strncat(prefix, "/64",sizeof(prefix)-1);
#if defined(CISCO_CONFIG_DHCPV6_PREFIX_DELEGATION)
/* Use the delegated prefix length directly for platforms that support prefix delegation to LAN clients */
strncpy(prefix, pVirtIf->IP.Ipv6Data.sitePrefix, sizeof(prefix) - 1);
Copy link

Copilot AI Dec 4, 2025

Choose a reason for hiding this comment

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

Missing null termination after strncpy. If pVirtIf->IP.Ipv6Data.sitePrefix is exactly sizeof(prefix) or longer, the resulting string may not be null-terminated. Add explicit null termination: prefix[sizeof(prefix) - 1] = '\0';

Suggested change
strncpy(prefix, pVirtIf->IP.Ipv6Data.sitePrefix, sizeof(prefix) - 1);
strncpy(prefix, pVirtIf->IP.Ipv6Data.sitePrefix, sizeof(prefix) - 1);
prefix[sizeof(prefix) - 1] = '\0';

Copilot uses AI. Check for mistakes.
@guto86 guto86 merged commit 97d0d65 into main Dec 4, 2025
7 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 4, 2025
@S-Parthiban-Selvaraj S-Parthiban-Selvaraj deleted the bugfix/prefixLengthIssue branch January 19, 2026 13:11
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.

4 participants