From e5deb3e94328ccac2fcd0706edf4d6a0f8170bab Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Tue, 5 Feb 2019 21:37:59 +0100 Subject: [PATCH] interfaces: correctly compare MAC addresses #1352 --- src/etc/inc/interfaces.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc index 3191f8c04..b6854f20f 100644 --- a/src/etc/inc/interfaces.inc +++ b/src/etc/inc/interfaces.inc @@ -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']));