file_notice("MAC Address altered",sprintf(gettext('The INVALID MAC address (ff:ff:ff:ff:ff:ff) on interface %s has been automatically replaced with %s'),$realif,$random_mac),"Interfaces");
}
}
/* media */
...
...
@@ -4684,23 +4671,6 @@ function get_interface_mac($interface)
return$macinfo["macaddr"];
}
/****f* legacy/generate_random_mac_address
* NAME
* generate_random_mac - generates a random mac address
* INPUTS
* none
* RESULT
* $mac - a random mac address
******/
functiongenerate_random_mac_address()
{
$mac="02";
for($x=0;$x<5;$x++){
$mac.=":".dechex(rand(16,255));
}
return$mac;
}
/****f* interfaces/is_jumbo_capable
* NAME
* is_jumbo_capable - Test if interface is jumbo frame capable. Useful for determining VLAN capability.