summaryrefslogtreecommitdiffstats
path: root/src/etc/inc/interfaces.inc
diff options
context:
space:
mode:
authorNOYB <Al_Stu@Frontier.com>2017-02-05 01:41:00 -0800
committerNOYB <Al_Stu@Frontier.com>2017-02-15 15:52:09 -0800
commit537a2bb0ceae7cca8bdd5ce70b90edcfeb0275f2 (patch)
treef18d52decaa2c3060aaab5b29be796214a0ed87f /src/etc/inc/interfaces.inc
parent2c20f47f391b630cb4eb5c764d1f2f17fd3cb873 (diff)
downloadpfsense-537a2bb0ceae7cca8bdd5ce70b90edcfeb0275f2.zip
pfsense-537a2bb0ceae7cca8bdd5ce70b90edcfeb0275f2.tar.gz
Vendor MAC Restore Logic
Only use the vendor MAC retention file for restoring the vendor MAC when not booting. a) During boot up the current MAC that is obtained from the system is the vendor MAC. b) Using this eliminates the inefficient need to open the vendor MAC retention file for every interface during system boot up.
Diffstat (limited to 'src/etc/inc/interfaces.inc')
-rw-r--r--src/etc/inc/interfaces.inc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc
index 9065ea4..9d1ddd8 100644
--- a/src/etc/inc/interfaces.inc
+++ b/src/etc/inc/interfaces.inc
@@ -3272,8 +3272,13 @@ function interface_configure($interface = "wan", $reloadall = false, $linkupeven
interface_wireless_configure($realif, $wancfg, $wancfg['wireless']);
}
+ /* Get the vendor MAC. Use source dependent upon whether or not booting. */
$current_mac = get_interface_mac($realhwif);
- $vendor_mac = get_interface_vendor_mac($realhwif);
+ if (platform_booting()) {
+ $vendor_mac = $current_mac;
+ } else {
+ $vendor_mac = get_interface_vendor_mac($realhwif);
+ }
$mac_addr = $wancfg['spoofmac'] ?: $vendor_mac;
/*
* Don't try to reapply the MAC if it's already applied.
OpenPOWER on IntegriCloud