summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-03-26 21:46:08 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-03-26 21:46:08 +0000
commitd8c67d69a75c43ff338c48df8a3e2697a8d2b09b (patch)
tree8418b20a967e8b7696139e712fc236b307ea14ad
parent3883609cf99858f4860022438b68ba54919f4969 (diff)
downloadpfsense-d8c67d69a75c43ff338c48df8a3e2697a8d2b09b.zip
pfsense-d8c67d69a75c43ff338c48df8a3e2697a8d2b09b.tar.gz
MFC wireless changes
-rw-r--r--etc/inc/interfaces.inc32
-rwxr-xr-xusr/local/www/interfaces_wlan.inc22
2 files changed, 49 insertions, 5 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index cdd3cce..21b46bc 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -1505,4 +1505,36 @@ function discover_bridge($interface1, $interface2) {
return "-1";
}
+function get_wireless_modes($interface)
+{
+ /* return wireless modes and channels */
+ if(is_interface_wireless($interface)) {
+ $wi = 1;
+ $ifconfig = "/sbin/ifconfig";
+ $awk = "/usr/bin/awk";
+ $chan_list = "$ifconfig $interface list chan";
+ $stack_list = "$awk -F\"Channel \" '{print \$2 \"\\\n\" \$3 }'";
+ $format_list = "$awk '{print \$5 \" \" \$6 \",\" \$1}'";
+
+ exec("$chan_list | $stack_list | sort -u | $format_list 2>&1", $interface_channels);
+ $interface_channel_count = count($interface_channels);
+
+ $c = 0;
+ while ($c < $interface_channel_count)
+ {
+ $channel_line = explode(",", $interface_channels["$c"]);
+
+ $wireless_mode = trim($channel_line[0]);
+ $wireless_channel = trim($channel_line[1]);
+
+ if(trim($wireless_mode) != "") {
+ $wireless_modes["$wireless_mode"]["$c"] = $wireless_channel;
+ }
+ $c++;
+ }
+
+ }
+ return($wireless_modes);
+}
+
?> \ No newline at end of file
diff --git a/usr/local/www/interfaces_wlan.inc b/usr/local/www/interfaces_wlan.inc
index 54539c2..df5f913 100755
--- a/usr/local/www/interfaces_wlan.inc
+++ b/usr/local/www/interfaces_wlan.inc
@@ -78,8 +78,9 @@ function wireless_config_init() {
}
function wireless_config_post() {
- global $optcfg, $pconfig, $input_errors;
+ global $optcfg, $pconfig;
+ $input_errors = "";
unset($input_errors);
/* input validation */
@@ -138,7 +139,6 @@ function wireless_config_post() {
$optcfg['wireless']['mode'] = $_POST['mode'];
$optcfg['wireless']['protmode'] = $_POST['protmode'];
$optcfg['wireless']['ssid'] = $_POST['ssid'];
-
$optcfg['wireless']['channel'] = $_POST['channel'];
$optcfg['wireless']['authmode'] = $_POST['authmode'];
$optcfg['wireless']['txpower'] = $_POST['txpower'];
@@ -449,6 +449,21 @@ function wireless_config_print() {
</td>
</tr>
<? /*
+ <tr>
+ <td valign="top" class="vncell">Enable MAC Filtering</td>
+ <td class="vtable"><input name="mac_acl_enable" type="checkbox" value="yes" class="formfld" id="mac_acl_enable" <? if ($pconfig['mac_acl_enable']) echo "checked"; ?>>
+ Setting this option will enable the use of a mac filterlist to allow/deny association based on mac address
+ <br/><br/>
+ <select name="macaddr_acl" class="formfld" id="macaddr_acl">
+ <option <? if ($pconfig['macaddr_acl'] == '0') echo "selected";?> value="0">Allow</option>
+ <option <? if ($pconfig['macaddr_acl'] == '1') echo "selected";?> value="1">Deny</option>
+ <option <? if ($pconfig['macaddr_acl'] == '2') echo "selected";?> value="2">Radius</option>
+ </select>
+ <br/><br/>
+ Setting this to "Allow" will allow all clients in not in deny list, while "Deny" will deny all clients not in allow list.
+ Radius will cause allow and deny list to be searched and then query radius.</br>
+ </td>
+ </tr>
*/ ?>
<tr>
<td valign="top" class="vncell">Authentication</td>
@@ -493,7 +508,4 @@ function wireless_config_print() {
<br/>Setting this option will enable 802.1x authentication.
</td>
</tr>
- <script language="JavaScript">
- document.iform.noedit.enabled = false;
- </script>
<? } ?>
OpenPOWER on IntegriCloud