Skip to content

Conversation

@ecigar13
Copy link
Contributor

@ecigar13 ecigar13 commented Nov 17, 2025

Reason for Change:
The net.ParseMAC function does not support windows MAC address, which is a hex dump without delimiter, so we make a wrapper to add colon : delimiters to the MAC address before parsing if it doesn't have any delimiter.

Issue Fixed:

Requirements:

Notes:

Copilot AI review requested due to automatic review settings November 17, 2025 16:51
@ecigar13 ecigar13 requested a review from a team as a code owner November 17, 2025 16:51
@ecigar13 ecigar13 requested a review from neaggarwMS November 17, 2025 16:51
Copilot finished reviewing on behalf of ecigar13 November 17, 2025 16:52
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 adds support for parsing Windows MAC address format from IMDS, which returns MAC addresses as hex dumps without delimiters (e.g., "00005e005302" instead of "00:00:5e:00:53:02").

  • Introduces a new parseMacAddress helper function that detects hex dump format and adds delimiters before parsing
  • Updates test data to include a Windows-format MAC address to verify the new parsing logic
  • Maintains backward compatibility with standard delimited MAC address formats

Reviewed Changes

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

File Description
cns/imds/client.go Adds parseMacAddress function to handle Windows hex dump MAC format by detecting undelimited strings and inserting colons before parsing with net.ParseMAC
cns/imds/client_test.go Updates test data to include a Windows-format MAC address ("00005e005302") to validate the new parsing capability

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

@ecigar13 ecigar13 added cns Related to CNS. swift-v2 vnet-scale PRs related to the Vnet Scale Feature ipv6 labels Nov 17, 2025
@kadevu
Copy link
Contributor

kadevu commented Nov 20, 2025

/azp run Azure Container Networking PR

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 4122 in repo Azure/azure-container-networking

@ecigar13 ecigar13 enabled auto-merge November 20, 2025 21:12
@ecigar13 ecigar13 closed this Nov 20, 2025
auto-merge was automatically disabled November 20, 2025 21:13

Pull request was closed

@ecigar13 ecigar13 reopened this Nov 20, 2025
@ecigar13 ecigar13 enabled auto-merge November 20, 2025 21:13
@ecigar13
Copy link
Contributor Author

/azp run Azure Container Networking PR

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ecigar13 ecigar13 added this pull request to the merge queue Nov 20, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 21, 2025
@NihaNallappagari NihaNallappagari added this pull request to the merge queue Nov 21, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 21, 2025
@NihaNallappagari NihaNallappagari added this pull request to the merge queue Nov 21, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 21, 2025
@NihaNallappagari NihaNallappagari added this pull request to the merge queue Nov 22, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 22, 2025
@NihaNallappagari NihaNallappagari added this pull request to the merge queue Nov 22, 2025
github-merge-queue bot pushed a commit that referenced this pull request Nov 22, 2025
* feat: add support for windows MAC hex dump

* test: invalid MAC address length

* fix: typo

* fix: comment

---------

Co-authored-by: Keith Nguyen <keithnguyen@microsoft.com>
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 22, 2025
@NihaNallappagari NihaNallappagari added this pull request to the merge queue Nov 22, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 22, 2025
@ecigar13 ecigar13 removed the request for review from neaggarwMS November 23, 2025 01:55
@ecigar13 ecigar13 added this pull request to the merge queue Nov 23, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 23, 2025
@ecigar13 ecigar13 added this pull request to the merge queue Nov 24, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 24, 2025
@NihaNallappagari NihaNallappagari added this pull request to the merge queue Nov 24, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cns Related to CNS. ipv6 swift-v2 vnet-scale PRs related to the Vnet Scale Feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants