diff options
author | NOYB <Al_Stu@Frontier.com> | 2017-02-05 01:33:54 -0800 |
---|---|---|
committer | NOYB <Al_Stu@Frontier.com> | 2017-02-15 15:52:09 -0800 |
commit | 2c20f47f391b630cb4eb5c764d1f2f17fd3cb873 (patch) | |
tree | bc79f645cb6ba45bf254a0c9f4e0e082d8ec56ab /src/etc/inc/interfaces.inc | |
parent | f25c08c95b76b5eb21690bea8cc5dd70cd3ab970 (diff) | |
download | pfsense-2c20f47f391b630cb4eb5c764d1f2f17fd3cb873.zip pfsense-2c20f47f391b630cb4eb5c764d1f2f17fd3cb873.tar.gz |
Spoof MAC Var Name
Rename 'spoof_mac' var to generic 'mac_addr'.
a) It may be the vendor MAC or a spoofed MAC.
b) Update the comment re: not reapplying an already applied MAC.
Diffstat (limited to 'src/etc/inc/interfaces.inc')
-rw-r--r-- | src/etc/inc/interfaces.inc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc index 74a8a33..9065ea4 100644 --- a/src/etc/inc/interfaces.inc +++ b/src/etc/inc/interfaces.inc @@ -3274,16 +3274,16 @@ function interface_configure($interface = "wan", $reloadall = false, $linkupeven $current_mac = get_interface_mac($realhwif); $vendor_mac = get_interface_vendor_mac($realhwif); - $spoof_mac = $wancfg['spoofmac'] ?: $vendor_mac; + $mac_addr = $wancfg['spoofmac'] ?: $vendor_mac; /* - * Don't try to reapply the spoofed MAC if it's already applied. + * Don't try to reapply the MAC if it's already applied. * When ifconfig link is used, it cycles the interface down/up, which triggers - * the interface config again, which attempts to spoof the MAC again, + * the interface config again, which attempts to apply the MAC again, * which cycles the link again... */ - if (!empty($spoof_mac) && ($spoof_mac != $current_mac)) { + if (!empty($mac_addr) && ($mac_addr != $current_mac)) { mwexec("/sbin/ifconfig " . escapeshellarg($realhwif) . - " link " . escapeshellarg($spoof_mac)); + " link " . escapeshellarg($mac_addr)); } elseif ($current_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. |