minor change to random_mac()

This commit is contained in:
fduncanh
2021-08-03 23:24:55 -04:00
parent d30bc46e00
commit a3ebb64d0c

View File

@@ -103,7 +103,7 @@ std::string random_mac () {
octet = (octet << 1) + LOCAL;
octet = (octet << 1) + MULTICAST;
snprintf(str,3,"%02x",octet);
std::string mac_address = str;
std::string mac_address(str);
for (int i = 1; i < OCTETS; i++) {
mac_address = mac_address + ":";
octet = rand() % 256;