summaryrefslogtreecommitdiff
path: root/util/nvmutil/nvmutil.c
diff options
context:
space:
mode:
authorlbmkplaceholder <placeholder@lbmkplaceholder.com>2022-12-14 08:15:07 +0000
committerlbmkplaceholder <placeholder@lbmkplaceholder.com>2022-12-14 08:15:07 +0000
commitab2cfb86396231843bb41ffdd818d7fbf41283d8 (patch)
treea3f5dc9744c219e8b73e0ae4ae0e472511f96c65 /util/nvmutil/nvmutil.c
parentfea3e51ccda0cf444dc1d9af39be7d9a8c7c69d5 (diff)
util/nvmutil: only mask random unicast/local macs
Without this change, arbitrary MAC addresses will always be masked. This change restores the intended behaviour.
Diffstat (limited to 'util/nvmutil/nvmutil.c')
-rw-r--r--util/nvmutil/nvmutil.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index da954b32..8549e8d2 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -183,8 +183,8 @@ cmd_setmac(const char *strMac)
return;
goto invalid_mac_address;
} else if ((byte == 0) && (nib == 1)) {
- val8 &= 0xE;
- val8 |= 2;
+ if (strMac[o + nib] == '?')
+ val8 = (val8 & 0xE) | 2;
}
val16 = val8;