From cb6ec88a16f63afbcc82268213d104fc87bb9abe Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Fri, 22 Nov 2024 08:50:09 +0100 Subject: [PATCH] Interfaces: Wireless: Devices - try to remove mac trickery for hostapd for https://github.com/opnsense/core/issues/8079 All of this stuff looks really old, it seems to originate from https://github.com/pfsense/pfsense/commit/864bf77420afb47d55bf8b84b789020182095d44, which might be an issue that doesn't actually exist anymore.. --- src/etc/inc/interfaces.inc | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc index 51453092d..d6c998d2e 100644 --- a/src/etc/inc/interfaces.inc +++ b/src/etc/inc/interfaces.inc @@ -2078,29 +2078,7 @@ EOD; fwrite($fd_set, "{$wpa_supplicant} -B -i {$if} -c /var/etc/wpa_supplicant_{$if}.conf\n"); } if ($wlcfg['mode'] == "hostap") { - /* add line to script to restore old mac to make hostapd happy */ - if (file_exists("/tmp/{$if}_oldmac")) { - $if_oldmac = file_get_contents("/tmp/{$if}_oldmac"); - if (is_macaddr($if_oldmac)) { - fwrite($fd_set, "{$ifconfig} " . escapeshellarg($if) . - " link " . escapeshellarg($if_oldmac) . "\n"); - } - } - fwrite($fd_set, "{$hostapd} -B -P /var/run/hostapd_{$if}.pid /var/etc/hostapd_{$if}.conf\n"); - - /* add line to script to restore spoofed mac after running hostapd */ - if (file_exists("/tmp/{$if}_oldmac")) { - if ($wancfg['spoofmac']) { - $if_curmac = $wancfg['spoofmac']; - } else { - $if_curmac = get_interface_mac($if); - } - if (is_macaddr($if_curmac)) { - fwrite($fd_set, "{$ifconfig} " . escapeshellarg($if) . - " link " . escapeshellarg($if_curmac) . "\n"); - } - } } }