mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 00:24:40 +00:00
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 864bf77420, which might be an issue that doesn't actually exist anymore..
This commit is contained in:
parent
d4378f00b3
commit
cb6ec88a16
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user