mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Do not killall all hostpad or wpa_supplicant processes. This is NOT multi interface friendly.
Instead look for the process with the interface in it and kill the correct one.
This commit is contained in:
parent
b76fd87feb
commit
4b2a618018
@ -606,7 +606,7 @@ EOD;
|
||||
fwrite($fd, "{$wpa}");
|
||||
fclose($fd);
|
||||
|
||||
fwrite($fd_set, "{$killall} wpa_supplicant\n");
|
||||
kill_wpasupplicant($if);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -645,13 +645,13 @@ EOD;
|
||||
fwrite($fd, "{$wpa}");
|
||||
fclose($fd);
|
||||
|
||||
fwrite($fd_set, "{$killall} hostapd\n");
|
||||
kill_hostapd($if);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'adhoc':
|
||||
fwrite($fd_set, "{$killall} hostapd\n");
|
||||
fwrite($fd_set, "{$killall} wpa_supplicant\n");
|
||||
kill_hostapd($if);
|
||||
kill_wpasupplicant($if);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -709,6 +709,14 @@ EOD;
|
||||
|
||||
}
|
||||
|
||||
function kill_hostapd($interface) {
|
||||
mwexec("/bin/ps awwuxx | grep hostatpd | grep $interface | awk '{ print \$2 }' | xargs kill");
|
||||
}
|
||||
|
||||
function kill_wpasupplicant($interface) {
|
||||
mwexec("/bin/ps awwuxx | grep wpa_supplicant | grep $interface | awk '{ print \$2 }' | xargs kill");
|
||||
}
|
||||
|
||||
function find_dhclient_process($interface) {
|
||||
if(filter_translate_type_to_real_interface($interface) <> "")
|
||||
$realinterface = filter_translate_type_to_real_interface($interface);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user