From ab2cfb86396231843bb41ffdd818d7fbf41283d8 Mon Sep 17 00:00:00 2001 From: lbmkplaceholder Date: Wed, 14 Dec 2022 08:15:07 +0000 Subject: util/nvmutil: only mask random unicast/local macs Without this change, arbitrary MAC addresses will always be masked. This change restores the intended behaviour. --- util/nvmutil/nvmutil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util') 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; -- cgit v1.2.1