diff options
author | Erik Fonnesbeck <efonnes@gmail.com> | 2010-03-26 20:55:13 -0600 |
---|---|---|
committer | Erik Fonnesbeck <efonnes@gmail.com> | 2010-03-26 20:55:13 -0600 |
commit | b5582f49d24ed5db546eca2e416ec7c99ba55077 (patch) | |
tree | 8da18ef402f29cd48ae4e39350b080f3da5b08d6 /etc | |
parent | c8178bb7dd399af0d3b5919361c3d7548e189f72 (diff) | |
download | pfsense-b5582f49d24ed5db546eca2e416ec7c99ba55077.zip pfsense-b5582f49d24ed5db546eca2e416ec7c99ba55077.tar.gz |
Kill hostapd and wpa_supplicant when bringing the interface down.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/interfaces.inc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 6a6d55c..d36001d 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -864,6 +864,13 @@ function interface_bring_down($interface = "wan", $destroy = false) { break; } + /* hostapd and wpa_supplicant do not need to be running when the interface is down. + * They will also use 100% CPU if running after the wireless clone gets deleted. */ + if (is_array($ifcfg['wireless'])) { + mwexec(kill_hostapd($realif)); + mwexec(kill_wpasupplicant($realif)); + } + if ($destroy == true) { if (preg_match("/^tun|^ovpn|^gif|^gre|^lagg|^bridge|vlan/i", $realif)) mwexec("/sbin/ifconfig {$realif} destroy"); |