Skip to content

RDKEMW-14910: IPv6 ULA field in network interface API response#294

Open
cmuhammedrafi wants to merge 13 commits intodevelopfrom
topic/RDKEMW-14910
Open

RDKEMW-14910: IPv6 ULA field in network interface API response#294
cmuhammedrafi wants to merge 13 commits intodevelopfrom
topic/RDKEMW-14910

Conversation

@cmuhammedrafi
Copy link
Copy Markdown
Contributor

Reason for change: Fix ULA field error

@cmuhammedrafi cmuhammedrafi requested a review from a team as a code owner March 24, 2026 10:41
Copilot AI review requested due to automatic review settings March 24, 2026 10:41
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 the IPv6 ula value returned by the Network Interface API by identifying IPv6 Unique Local Addresses (ULA, fc00::/7) instead of incorrectly treating link-local (fe80::/10) addresses as ULA.

Changes:

  • Update IPv6 address parsing to classify fc*/fd* addresses as ULA and skip fe80* link-local addresses.
  • Adjust IPv6 address-change event filtering to ignore ULA addresses.
  • Update the libnm proxy unit test to include a ULA address and validate the ula field in the response.

Reviewed changes

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

File Description
tests/l2Test/libnm/l2_test_libnmproxy.cpp Extends IPv6 test data and expectations to validate ula is populated from a ULA address.
plugin/gnome/NetworkManagerGnomeProxy.cpp Fixes IPv6 ULA detection logic and improves logging/message spelling.
plugin/gnome/NetworkManagerGnomeEvents.cpp Filters out ULA addresses from IPv6 address-change notifications.

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

Copilot AI review requested due to automatic review settings March 24, 2026 11:21
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 3 out of 3 changed files in this pull request and generated 4 comments.


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

cmuhammedrafi and others added 2 commits March 24, 2026 16:57
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 24, 2026 13:24
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 3 out of 3 changed files in this pull request and generated 3 comments.


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

@bpunnuru
Copy link
Copy Markdown

Instead of checking the ipaddress range, can we return only Global IPs that are not of ULA Type?

Copilot AI review requested due to automatic review settings March 25, 2026 12:08
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 3 out of 3 changed files in this pull request and generated 3 comments.


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

Comment on lines 344 to +351
if(ipaddr != NULL) {
std::string ipAddress = ipaddr;
if (ipAddress.compare(0, 5, "fe80:") == 0 ||
ipAddress.compare(0, 6, "fe80::") == 0) {
NMLOG_DEBUG("%s It's link-local ip", ipAddress.c_str());
continue; // It's link-local so skiping
if(ipAddress[0] != '2' && ipAddress[0] != '3')
{
// Global Unicast Address (RFC 4291, 2000::/3)
// 2000::/3 covers first bytes 0x20-0x3f, which in hex string always starts with '2' or '3'.
NMLOG_DEBUG("%s Not a global unicast address", ipAddress.c_str());
continue;
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

ipAddress[0] is accessed without checking ipAddress is non-empty. If nm_ip_address_get_address() returns an empty string (or something that becomes empty after conversion), this is undefined behavior and can crash. Add an ipAddress.empty() guard before indexing.

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants