diff options
author | Erik Fonnesbeck <efonnes@gmail.com> | 2010-03-26 20:12:52 -0600 |
---|---|---|
committer | Erik Fonnesbeck <efonnes@gmail.com> | 2010-03-26 20:12:52 -0600 |
commit | c8178bb7dd399af0d3b5919361c3d7548e189f72 (patch) | |
tree | c95b8ab0f4c7b532973f4c77ab7f9237746af37a /etc/inc/interfaces.inc | |
parent | 9c4d33a1e6d73def40b7c3ade66d861e8934b6e4 (diff) | |
download | pfsense-c8178bb7dd399af0d3b5919361c3d7548e189f72.zip pfsense-c8178bb7dd399af0d3b5919361c3d7548e189f72.tar.gz |
Always kill both hostapd and wpa_supplicant, or they may stay running when WPA is disabled or even both can end up running when switching between AP and station modes.
Diffstat (limited to 'etc/inc/interfaces.inc')
-rw-r--r-- | etc/inc/interfaces.inc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index c3595a6..6a6d55c 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -1671,6 +1671,9 @@ function interface_wireless_configure($if, &$wl, &$wlcfg) { $wlcmd[] = "authmode open wepmode off "; } + mwexec(kill_hostapd("{$if}")); + mwexec(kill_wpasupplicant("{$if}")); + /* generate wpa_supplicant/hostap config if wpa is enabled */ conf_mount_rw(); @@ -1696,8 +1699,6 @@ EOD; $fd = fopen("{$g['varetc_path']}/wpa_supplicant_{$if}.conf", "w"); fwrite($fd, "{$wpa}"); fclose($fd); - - mwexec(kill_wpasupplicant("{$if}")); } break; case 'hostap': @@ -1756,11 +1757,6 @@ EOD; fclose($fd); } - mwexec(kill_hostapd("{$if}")); - break; - case 'adhoc': - mwexec(kill_hostapd("{$if}")); - mwexec(kill_wpasupplicant("{$if}")); break; } |