summaryrefslogtreecommitdiffstats
path: root/etc/inc/interfaces.inc
diff options
context:
space:
mode:
authorErik Fonnesbeck <efonnes@gmail.com>2010-03-26 20:12:52 -0600
committerErik Fonnesbeck <efonnes@gmail.com>2010-03-26 20:12:52 -0600
commitc8178bb7dd399af0d3b5919361c3d7548e189f72 (patch)
treec95b8ab0f4c7b532973f4c77ab7f9237746af37a /etc/inc/interfaces.inc
parent9c4d33a1e6d73def40b7c3ade66d861e8934b6e4 (diff)
downloadpfsense-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.inc10
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;
}
OpenPOWER on IntegriCloud