Commit 0db74eff authored by Ad Schellevis's avatar Ad Schellevis

lets not try to hide issues with a NIC, 11 year old code.

parent 2f860487
......@@ -2762,19 +2762,6 @@ function interface_configure($interface = 'wan', $reloadall = false, $linkupeven
}
}
}
} else {
if ($mac == "ff:ff:ff:ff:ff:ff") {
/* this is not a valid mac address. generate a
* temporary mac address so the machine can get online.
*/
echo gettext("Generating new MAC address.");
$random_mac = generate_random_mac_address();
mwexec("/sbin/ifconfig " . escapeshellarg($realhwif) .
" link " . escapeshellarg($random_mac));
$wancfg['spoofmac'] = $random_mac;
write_config();
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 */
......@@ -4682,23 +4669,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
******/
function generate_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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment