]> Cypherpunks repositories - gostls13.git/commit
net: parse addresses without separators in ParseMac
authorDevon Mar <devonm@mdmm.ca>
Tue, 25 Nov 2025 07:38:09 +0000 (07:38 +0000)
committerGopher Robot <gobot@golang.org>
Tue, 2 Dec 2025 20:42:13 +0000 (12:42 -0800)
commit043b9de65825abef6d8946affda075a777dfb322
tree5d72a7fe91a65db6d4af355f9e26ee25218de4bb
parente432b4f3a1e067ac8fe7b8e0edbe60ca1f52475d
net: parse addresses without separators in ParseMac

IEEE EUI guidelines states that "an EUI-48 can be represented in the IEEE RA
hexadecimal (hex) form with the octets separated by hyphens, or as a pure
base-16 numerical representation without hyphens"
(https://standards.ieee.org/wp-content/uploads/import/documents/tutorials/eui.pdf p.9).
The latter form is used in Azure Instance Metadata Service
(https://github.com/Azure/azure-container-networking/pull/4122) among others.

Fixes #66682

Change-Id: Id66c23d50ebb1fed1f3bdb5cf3822a8fd60b886d
GitHub-Last-Rev: 77900cc1a68cb535b685a63cf84b5413b480df2c
GitHub-Pull-Request: golang/go#76387
Reviewed-on: https://go-review.googlesource.com/c/go/+/722720
Auto-Submit: Damien Neil <dneil@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/net/mac.go
src/net/mac_test.go