summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNOYB <Al_Stu@Frontier.com>2017-02-05 01:33:54 -0800
committerRenato Botelho <renato@netgate.com>2017-04-26 18:06:13 -0300
commitf2a19d77746f1160ecb87059f87c92ebda137ff1 (patch)
treeb0ee0ba559c5439bf3a62650dbab84d11e762893
parent358354b9f79376b9f163b73b766821dc061beaae (diff)
downloadpfsense-f2a19d77746f1160ecb87059f87c92ebda137ff1.zip
pfsense-f2a19d77746f1160ecb87059f87c92ebda137ff1.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.
-rw-r--r--src/etc/inc/interfaces.inc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc
index db011cf..ec0dee9 100644
--- a/src/etc/inc/interfaces.inc
+++ b/src/etc/inc/interfaces.inc
@@ -3266,16 +3266,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.
OpenPOWER on IntegriCloud