diff options
author | Thomas Haller <thaller@redhat.com> | 2020-09-23 12:18:46 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-09-23 13:57:38 +0200 |
commit | 2d360d8293ffe72b656865ef643bec77b84546f0 (patch) | |
tree | c3ad74de0bf9f3a935920dc8de3d0a09a5908f54 /clients/cloud-setup | |
parent | dea59122e7e02ab9ce505c48d5226e076384c957 (diff) | |
download | NetworkManager-2d360d8293ffe72b656865ef643bec77b84546f0.tar.gz |
cloud-setup: add code comment to nmcs_utils_hwaddr_normalize()
Diffstat (limited to 'clients/cloud-setup')
-rw-r--r-- | clients/cloud-setup/nm-cloud-setup-utils.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clients/cloud-setup/nm-cloud-setup-utils.c b/clients/cloud-setup/nm-cloud-setup-utils.c index 14f60fe4b9..55a9aebf0e 100644 --- a/clients/cloud-setup/nm-cloud-setup-utils.c +++ b/clients/cloud-setup/nm-cloud-setup-utils.c @@ -501,7 +501,9 @@ nmcs_utils_hwaddr_normalize (const char *hwaddr, gssize len) nm_assert (hwaddr); hwaddr = nm_strndup_a (300, hwaddr, len, &hwaddr_clone); } - if(!nm_utils_hexstr2bin_full (hwaddr, FALSE, FALSE, FALSE, ":-", sizeof (buf), buf, sizeof (buf), NULL)) + /* we cannot use _nm_utils_hwaddr_aton() because that requires a delimiter. + * Azure exposes MAC addresses without delimiter, so accept that too. */ + if (!nm_utils_hexstr2bin_full (hwaddr, FALSE, FALSE, FALSE, ":-", sizeof (buf), buf, sizeof (buf), NULL)) return NULL; return nm_utils_hwaddr_ntoa (buf, sizeof (buf)); |