diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-08-29 23:23:08 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-08-29 23:23:08 +0000 |
commit | 50ad3b7c29a7b5e6a73a2748edfe85f4e836e754 (patch) | |
tree | fb87a16071c1cd878767a5d9b5a05522261a9122 /etc/inc/interfaces.inc | |
parent | b43ba51b63bb6b29c32fc61316dbdece2372b365 (diff) | |
download | pfsense-50ad3b7c29a7b5e6a73a2748edfe85f4e836e754.zip pfsense-50ad3b7c29a7b5e6a73a2748edfe85f4e836e754.tar.gz |
Add WPA backend support
Diffstat (limited to 'etc/inc/interfaces.inc')
-rw-r--r-- | etc/inc/interfaces.inc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 4b1bf08..032331e 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -394,6 +394,30 @@ function interfaces_wireless_configure($if, $wlcfg) { if ($wlcfg['stationname']) $ifcargs .= "stationname " . escapeshellarg($wlcfg['stationname']) . " "; + + if (isset($wlcfg['wpa']['enable'])) { + + $wpa .= <<<EOD + +ctrl_interface_group=0 +eapol_version=1 +ap_scan=1 +fast_reauth=1 + +network=\{ + ssid="{$wlcfg['ssid']}" + key_mgmt="{$wlcfg['wpapsk']}" + psk="{$wlcfg['passphrase']}" +} + +EOD; + + $fd = fopen("{$g['etc_path']}/ifconfig_{$if}", "w"); + fwrite($fd, "{$wpa}"); + fclose($fd); + mwexec_bg("wpa_supplicant -i {$if} -c /etc/wpa_supplicant.conf"); + + } if (isset($wlcfg['wep']['enable']) && is_array($wlcfg['wep']['key'])) { $ifcargs .= "wepmode on "; |