mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 08:09:41 +00:00
interfaces: correctly compare MAC addresses #1352
This commit is contained in:
parent
5ad905c897
commit
e5deb3e943
@ -2388,13 +2388,14 @@ function interface_configure($verbose = false, $interface = 'wan', $reload = fal
|
||||
}
|
||||
|
||||
$mac = get_interface_mac($realhwif);
|
||||
|
||||
/*
|
||||
* Don't try to reapply the spoofed 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,
|
||||
* which cycles the link again...
|
||||
*/
|
||||
if (!empty($wancfg['spoofmac']) && ($wancfg['spoofmac'] != $mac)) {
|
||||
if (!empty($wancfg['spoofmac']) && strcasecmp($wancfg['spoofmac'], $mac)) {
|
||||
mwexec("/sbin/ifconfig " . escapeshellarg($realhwif) .
|
||||
" link " . escapeshellarg($wancfg['spoofmac']));
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user