diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-09-02 01:05:02 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-09-02 01:05:02 +0000 |
commit | 459d63517d9a156e2ed4bd03912477971f44a67d (patch) | |
tree | 7e795cb98f431cf91eb0128c623a6c28ea0285f4 /etc | |
parent | fda1fdaec91c829a5decde847b293ff41170195e (diff) | |
download | pfsense-459d63517d9a156e2ed4bd03912477971f44a67d.zip pfsense-459d63517d9a156e2ed4bd03912477971f44a67d.tar.gz |
Add HOSTAP WPA support
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/interfaces.inc | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 032331e..bcbed62 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -445,6 +445,37 @@ EOD; $ifcargs .= "-mediaopt adhoc mediaopt hostap "; else if (strstr($if, "wi")) $ifcargs .= "-mediaopt ibss mediaopt hostap "; + if (isset($wlcfg['wpa']['enable'])) { +$wpa .= <<<EOD + +interface={$if} +driver=bsd +logger_syslog=-1 +logger_syslog_level=0 +logger_stdout=-1 +logger_stdout_level=0 +debug=4 +dump_file=/tmp/hostapd.dump +ctrl_interface=/var/run/hostapd +ctrl_interface_group=wheel +ssid={$wlcfg['ssid']} +macaddr_acl=1 +auth_algs=3 +eapol_key_index_workaround=0 +wpa=1 +wpa_key_mgmt={$wlcfg['wpapsk']} +wpa_pairwise=CCMP +wpa_group_rekey=60 +wpa_gmk_rekey=3600 +wpa_passphrase={$wlcfg['passphrase']} + +EOD; + $fd = fopen("{$g['etc_path']}/hostapd_{$if}.conf", "w"); + fwrite($fd, "{$wpa}"); + fclose($fd); + mwexec("hostpad -B {$g['etc_path']}/hostapd_{$if}.conf"); + } + break; case 'ibss': case 'IBSS': |