From 0db74efff42d905fa8713b16c5d0bea11226b921 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Thu, 15 Sep 2016 14:30:40 +0200 Subject: [PATCH] lets not try to hide issues with a NIC, 11 year old code. --- src/etc/inc/interfaces.inc | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc index e215f3612..5914dcf3c 100644 --- a/src/etc/inc/interfaces.inc +++ b/src/etc/inc/interfaces.inc @@ -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.