Outsource creation of random MAC address to a new function create_random_mac.