Project

General

Profile

Download (21.5 KB) Statistics
| Branch: | Tag: | Revision:
1
<?
2
/* $Id$ */
3
/*
4
	interfaces_wlan.inc
5
	part of m0n0wall (http://m0n0.ch/wall)
6

    
7
	Copyright (C) 2003-2005 Manuel Kasper <mk@neon1.net>.
8
	All rights reserved.
9

    
10
	Redistribution and use in source and binary forms, with or without
11
	modification, are permitted provided that the following conditions are met:
12

    
13
	1. Redistributions of source code must retain the above copyright notice,
14
	   this list of conditions and the following disclaimer.
15

    
16
	2. Redistributions in binary form must reproduce the above copyright
17
	   notice, this list of conditions and the following disclaimer in the
18
	   documentation and/or other materials provided with the distribution.
19

    
20
	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
21
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
22
	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23
	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
24
	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
	POSSIBILITY OF SUCH DAMAGE.
30
*/
31

    
32
function wireless_config_init(&$optcfg) {
33
	global $pconfig;
34

    
35
	$pconfig['standard'] = $optcfg['wireless']['standard'];
36
	$pconfig['mode'] = $optcfg['wireless']['mode'];
37
	$pconfig['protmode'] = $optcfg['wireless']['protmode'];
38
	$pconfig['ssid'] = $optcfg['wireless']['ssid'];
39
	$pconfig['channel'] = $optcfg['wireless']['channel'];
40
	$pconfig['txpower'] = $optcfg['wireless']['txpower'];
41
	$pconfig['distance'] = $optcfg['wireless']['distance'];
42
	$pconfig['wme_enable'] = isset($optcfg['wireless']['wme']['enable']);
43
	$pconfig['pureg_enable'] = isset($optcfg['wireless']['pureg']['enable']);
44
	$pconfig['apbridge_enable'] = isset($optcfg['wireless']['apbridge']['enable']);
45
	$pconfig['authmode'] = $optcfg['wireless']['authmode'];
46
	$pconfig['hidessid_enable'] = isset($optcfg['wireless']['hidessid']['enable']);
47
	if (is_array($optcfg['wireless']['wpa'])) {
48
		$pconfig['debug_mode'] = $optcfg['wireless']['wpa']['debug_mode'];
49
		$pconfig['macaddr_acl'] = $optcfg['wireless']['wpa']['macaddr_acl'];
50
		$pconfig['mac_acl_enable'] = isset($optcfg['wireless']['wpa']['mac_acl_enable']);
51
		$pconfig['auth_algs'] = $optcfg['wireless']['wpa']['auth_algs'];
52
		$pconfig['wpa_mode'] = $optcfg['wireless']['wpa']['wpa_mode'];
53
		$pconfig['wpa_key_mgmt'] = $optcfg['wireless']['wpa']['wpa_key_mgmt'];
54
		$pconfig['wpa_pairwise'] = $optcfg['wireless']['wpa']['wpa_pairwise'];
55
		$pconfig['wpa_group_rekey'] = $optcfg['wireless']['wpa']['wpa_group_rekey'];
56
		$pconfig['wpa_gmk_rekey'] = $optcfg['wireless']['wpa']['wpa_gmk_rekey'];
57
		$pconfig['wpa_strict_rekey'] = isset($optcfg['wireless']['wpa']['wpa_strict_rekey']);
58
		$pconfig['passphrase'] = $optcfg['wireless']['wpa']['passphrase'];
59
		$pconfig['ieee8021x_enable'] = isset($optcfg['wireless']['wpa']['ieee8021x']['enable']);
60
		$pconfig['ext_wpa_sw'] = $optcfg['wireless']['wpa']['ext_wpa_sw'];
61
		$pconfig['wpa_enable'] = isset($optcfg['wireless']['wpa']['enable']);
62
	}
63
	$pconfig['wep_enable'] = isset($optcfg['wireless']['wep']['enable']);
64
	$pconfig['mac_acl'] = $optcfg['wireless']['mac_acl'];
65

    
66
	if (is_array($optcfg['wireless']['wep']) &&
67
		is_array($optcfg['wireless']['wep']['key'])) {
68
		$i = 1;
69
		foreach ($optcfg['wireless']['wep']['key'] as $wepkey) {
70
			$pconfig['key' . $i] = $wepkey['value'];
71
			if (isset($wepkey['txkey']))
72
				$pconfig['txkey'] = $i;
73
			$i++;
74
		}
75
		if (!isset($wepkey['txkey']))
76
			$pconfig['txkey'] = 1;
77
	}
78
}
79

    
80
function wireless_config_post(&$optcfg) {
81
	global $pconfig;
82

    
83
	$input_errors = "";
84
	unset($input_errors);
85

    
86
	/* input validation */
87
	if ($_POST['enable']) {
88
		$reqdfields = explode(" ", "mode ssid");
89
		$reqdfieldsn = explode(",", "Mode,SSID");
90
		do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
91

    
92
	}
93

    
94
	/* loop through keys and enforce size */
95
	for ($i = 1; $i <= 4; $i++) {
96
		if ($_POST['key' . $i]) {
97
			/* 64 bit */
98
			if(strlen($_POST['key' . $i]) == 5)
99
				continue;
100
			if(strlen($_POST['key' . $i]) == 10) {
101
				/* hex key */
102
				if(stristr($_POST['key' . $i], "0x") == false) {
103
					$_POST['key' . $i] = "0x" . $_POST['key' . $i];
104
				}
105
				continue;
106
			}
107
			if(strlen($_POST['key' . $i]) == 12) {
108
				/* hex key */
109
				if(stristr($_POST['key' . $i], "0x") == false) {
110
					$_POST['key' . $i] = "0x" . $_POST['key' . $i];
111
				}
112
				continue;
113
			}
114
			/* 128 bit */
115
			if(strlen($_POST['key' . $i]) == 13)
116
				continue;
117
			if(strlen($_POST['key' . $i]) == 26) {
118
				/* hex key */
119
				if(stristr($_POST['key' . $i], "0x") == false) {
120
					$_POST['key' . $i] = "0x" . $_POST['key' . $i];
121
				}
122
				continue;
123
			}
124
			if(strlen($_POST['key' . $i]) == 28)
125
				continue;
126
			$input_errors[] =  "Invalid wep key size.   Sizes should be 40 (64) bit keys or 104 (128) bit.";
127
			break;
128
		}
129
	}
130

    
131
	if (!$input_errors) {
132

    
133
		$optcfg['wireless']['standard'] = $_POST['standard'];
134
		$optcfg['wireless']['mode'] = $_POST['mode'];
135
		$optcfg['wireless']['protmode'] = $_POST['protmode'];
136
		$optcfg['wireless']['ssid'] = $_POST['ssid'];
137
		$optcfg['wireless']['channel'] = $_POST['channel'];
138
		$optcfg['wireless']['authmode'] = $_POST['authmode'];
139
		$optcfg['wireless']['txpower'] = $_POST['txpower'];
140
		$optcfg['wireless']['distance'] = $_POST['distance'];
141
		if (!is_array($optcfg['wireless']['wpa']))
142
			$optcfg['wireless']['wpa'] = array();
143
		$optcfg['wireless']['wpa']['macaddr_acl'] = $_POST['macaddr_acl'];
144
		$optcfg['wireless']['wpa']['auth_algs'] = $_POST['auth_algs'];
145
		$optcfg['wireless']['wpa']['wpa_mode'] = $_POST['wpa_mode'];
146
		$optcfg['wireless']['wpa']['wpa_key_mgmt'] = $_POST['wpa_key_mgmt'];
147
		$optcfg['wireless']['wpa']['wpa_pairwise'] = $_POST['wpa_pairwise'];
148
		$optcfg['wireless']['wpa']['wpa_group_rekey'] = $_POST['wpa_group_rekey'];
149
		$optcfg['wireless']['wpa']['wpa_gmk_rekey'] = $_POST['wpa_gmk_rekey'];
150
		$optcfg['wireless']['wpa']['passphrase'] = $_POST['passphrase'];
151
		$optcfg['wireless']['wpa']['ext_wpa_sw'] = $_POST['ext_wpa_sw'];
152

    
153
		if($_POST['hidessid_enable'] == "yes")
154
			$optcfg['wireless']['hidessid']['enable'] = true;
155
		else
156
			unset($optcfg['wireless']['hidessid']['enable']);
157

    
158
		if($_POST['mac_acl_enable'] == "yes")
159
			$optcfg['wireless']['wpa']['mac_acl_enable'] = true;
160
		else
161
			unset($optcfg['wireless']['wpa']['mac_acl_enable']);
162

    
163
		if($_POST['ieee8021x_enable'] == "yes")
164
			$optcfg['wireless']['wpa']['ieee8021x']['enable'] = true;
165
		else
166
			unset($optcfg['wireless']['wpa']['ieee8021x']['enable']);
167

    
168
		if($_POST['wpa_strict_rekey'] == "yes")
169
			$optcfg['wireless']['wpa']['wpa_strict_rekey'] = true;
170
		else
171
			unset($optcfg['wireless']['wpa']['wpa_strict_rekey']);
172

    
173
		if($_POST['debug_mode'] == "yes")
174
			$optcfg['wireless']['wpa']['debug_mode'] = true;
175
		else
176
			unset($optcfg['wireless']['wpa']['debug_mode']);
177

    
178
		if($_POST['wpa_enable'] == "yes")
179
			$optcfg['wireless']['wpa']['enable'] = $_POST['wpa_enable'] = true;
180
		else
181
			unset($optcfg['wireless']['wpa']['enable']);
182

    
183
		if($_POST['wep_enable'] == "yes") {
184
			if (!is_array($optcfg['wireless']['wep']))
185
                        	$optcfg['wireless']['wep'] = array();
186
			$optcfg['wireless']['wep']['enable'] = $_POST['wep_enable'] = true;
187
		} else
188
			unset($optcfg['wireless']['wep']['enable']);
189

    
190

    
191
		if($_POST['wme_enable'] == "yes") {
192
			if (!is_array($optcfg['wireless']['wme']))
193
                        	$optcfg['wireless']['wme'] = array();
194
			$optcfg['wireless']['wme']['enable'] = $_POST['wme_enable'] = true;
195
		} else
196
			unset($optcfg['wireless']['wme']['enable']);
197

    
198

    
199
		if($_POST['pureg_enable'] == "yes") {
200
			if (!is_array($optcfg['wireless']['pureg']))
201
                        	$optcfg['wireless']['pureg'] = array();
202
			$optcfg['wireless']['pureg']['enable'] = $_POST['pureg_enable'] = true;
203
		} else
204
			unset($optcfg['wireless']['pureg']['enable']);
205

    
206

    
207
		if($_POST['apbridge_enable'] == "yes") {
208
			if (!is_array($optcfg['wireless']['apbridge']))
209
                        	$optcfg['wireless']['apbridge'] = array();
210
			$optcfg['wireless']['apbridge']['enable'] = $_POST['apbridge_enable'] = true;
211
		} else
212
			unset($optcfg['wireless']['apbridge']['enable']);
213

    
214

    
215
		if($_POST['standard'] == "11a Turbo") {
216
			if (!is_array($optcfg['wireless']['turbo']))
217
                        	$optcfg['wireless']['turbo'] = array();
218
			$optcfg['wireless']['turbo']['enable'] = true;
219
		} else
220
			unset($optcfg['wireless']['turbo']['enable']);
221

    
222
		$optcfg['wireless']['wep']['key'] = array();
223

    
224
		for ($i = 1; $i <= 4; $i++) {
225
			if ($_POST['key' . $i]) {
226
				$newkey = array();
227
				$newkey['value'] = $_POST['key' . $i];
228
				if ($_POST['txkey'] == $i)
229
					$newkey['txkey'] = true;
230
				$optcfg['wireless']['wep']['key'][] = $newkey;
231
			}
232
		}
233
	}
234

    
235
	return $input_errors;
236
}
237

    
238
$curif = convert_friendly_interface_to_real_interface_name($if);
239
$wl_modes = get_wireless_modes($curif);
240

    
241
function wireless_config_print(&$optcfg) {
242
	global $pconfig, $wl_modes, $g;
243
?>
244

    
245
<script language="JavaScript">
246
	function openwindow(url) {
247
		var oWin = window.open(url,"pfSensePop","width=620,height=400,top=150,left=150");
248
		if (oWin==null || typeof(oWin)=="undefined") {
249
			return false;
250
		} else {
251
			return true;
252
		}
253
	}
254
</script>
255
                <tr>
256
                  <td colspan="2" valign="top" height="16"></td>
257
		</tr>
258

    
259
                <tr>
260
                  <td colspan="2" valign="top" class="listtopic">Wireless configuration</td>
261
		</tr>
262
		<tr>
263
			<td valign="top" class="vncellreq">Standard</td>
264
			<td class="vtable">
265
			<select name="standard" class="formselect" id="standard">
266
				<?php
267
				foreach($wl_modes as $wl_standard => $wl_channels) {
268
					PRINT "<option ";
269
					if ($pconfig['standard'] == "$wl_standard") {
270
						PRINT "selected ";
271
					}
272
					PRINT "value=\"$wl_standard\">802.$wl_standard</option>\n";
273
				}
274
				?>
275
				</select>
276
			</td>
277
		</tr>
278
		<tr>
279
			<td valign="top" class="vncellreq">Mode</td>
280
			<td class="vtable">
281
			<select name="mode" class="formselect" id="mode">
282
				<option <? if ($pconfig['mode'] == 'bss') echo "selected";?> value="bss">Infrastructure (BSS)</option>
283
				<option <? if ($pconfig['mode'] == 'adhoc') echo "selected";?> value="adhoc">Ad-hoc (IBSS)</option>
284
				<option <? if ($pconfig['mode'] == 'hostap') echo "selected";?> value="hostap">Access Point</option>
285
			</select>
286
			</td>
287
		</tr>
288
		<tr>
289
			<td valign="top" class="vncellreq">802.11g OFDM Protection Mode</td>
290
			<td class="vtable">
291
			<select name="protmode" class="formselect" id="protmode">
292
				<option <? if ($pconfig['protmode'] == 'off') echo "selected";?> value="off">Protection mode off</option>
293
				<option <? if ($pconfig['protmode'] == 'cts') echo "selected";?> value="cts">Protection mode CTS to self</option>
294
				<option <? if ($pconfig['protmode'] == 'rtscts') echo "selected";?> value="rtscts">Protection mode RTS and CTS</option>
295
			</select>
296
			<br/>
297
			For IEEE 802.11g, use the specified technique for protecting OFDM frames in a mixed 11b/11g network.
298
			<br/>
299
			</td>
300
		</tr>
301
		<tr>
302
			<td valign="top" class="vncellreq">SSID</td>
303
			<td class="vtable"><input name="ssid" type="text" class="formfld unknown" id="ssid" size="20" value="<?=htmlspecialchars($pconfig['ssid']);?>">
304
			</td>
305
                </tr>
306
		<tr>
307
			<td valign="top" class="vncell">802.11g only</td>
308
			<td class="vtable"><input name="pureg_enable" type="checkbox" value="yes"  class="formfld" id="pureg_enable" <? if ($pconfig['pureg_enable']) echo "checked";?>>
309
			<br/>When operating as an access point in 802.11g mode allow only 11g-capable stations to associate (11b-only stations are not permitted to associate).
310
			</td>
311
		</tr>
312
		<tr>
313
			<td valign="top" class="vncell">Allow intra-BSS communication</td>
314
			<td class="vtable"><input name="apbridge_enable" type="checkbox" value="yes"  class="formfld" id="apbridge_enable" <? if ($pconfig['apbridge_enable']) echo "checked";?>>
315
			<br/>
316
			When operating as an access point, enable this if you want to pass packets between wireless clients directly.
317
			<br/>
318
			Disabling the internal bridging is useful when traffic is to be processed with packet filtering.
319
			</td>
320
		</tr>
321
		<tr>
322
			<td valign="top" class="vncell">Enable WME</td>
323
			<td class="vtable"><input name="wme_enable" type="checkbox" class="formfld" id="wme_enable" value="yes" <? if ($pconfig['wme_enable']) echo "checked";?>>
324
			<br/>Setting this option will force the card to use WME (wireless QoS).
325
			</td>
326
		</tr>
327
		<tr>
328
			<td valign="top" class="vncell">Enable Hide SSID</td>
329
			<td class="vtable"><input name="hidessid_enable" type="checkbox" class="formfld" id="hidessid_enable" value="yes" <? if ($pconfig['hidessid_enable']) echo "checked";?>>
330
			<br/>
331
			Setting this option will force the card to NOT broadcast its SSID
332
			<br/>
333
			(this might create problems for some clients). </td>
334
		</tr>
335
                <tr>
336
			<td valign="top" class="vncellreq">Transmit power</td>
337
			<td class="vtable">
338
			<select name="txpower" class="formselect" id="txpower">
339
			<?
340
				for($x = 99; $x > 0; $x--) {
341
					if($pconfig["txpower"] == $x)
342
						$SELECTED = " SELECTED";
343
					else
344
						$SELECTED = "";
345
					echo "<option {$SELECTED}>{$x}</option>\n";
346
				}
347
			?>
348
			</select><br/>
349
			Note: Typically only a few discreet power settings are available and the driver will use the setting closest to the specified value.  Not all adaptors support changing the transmit power setting.
350
			</td>
351
		</tr>
352
                <tr>
353
			<td valign="top" class="vncellreq">Channel</td>
354
			<td class="vtable"><select name="channel" class="formselect" id="channel">
355
				<option <? if ($pconfig['channel'] == 0) echo "selected"; ?> value="0">Auto</option>
356
				<?php
357
				foreach($wl_modes as $wl_standard => $wl_channels) {
358
					if($wl_standard == "11g") { $wl_standard = "11b/g"; }
359
					foreach($wl_channels as $wl_channel) {
360
						PRINT "<option ";
361
						if ($pconfig['channel'] == "$wl_channel") {
362
							PRINT "selected ";
363
						}
364
						PRINT "value=\"$wl_channel\">$wl_standard - $wl_channel</option>\n";
365
					}
366
				}
367
				?>
368
			</select>
369
			<br/>
370
			Note: Not all channels may be supported by your card
371
		</tr>
372
		<tr>
373
			<td valign="top" class="vncell">Distance setting</td>
374
			<td class="vtable"><input name="distance" type="text" class="formfld unknown" id="distance" size="5" value="<?=htmlspecialchars($pconfig['distance']);?>">
375
			<br/>
376
			Note: This field can be used to tune ACK/CTS timers to fit the distance between AP and Client<br/>
377
			(measured in Meters and works only for Atheros based cards !)
378
			</td>
379
		</tr>
380
		<tr>
381
			<td valign="top" class="vncell">WEP</td>
382
			<td class="vtable"> <input name="wep_enable" type="checkbox" id="wep_enable" value="yes" <? if ($pconfig['wep_enable']) echo "checked"; ?>>
383
			<strong>Enable WEP</strong>
384
			<table border="0" cellspacing="0" cellpadding="0">
385
		<tr>
386
                        <td>&nbsp;</td>
387
                        <td>&nbsp;</td>
388
                        <td>&nbsp;TX key&nbsp;</td>
389
		</tr>
390
		<tr>
391
                        <td>Key 1:&nbsp;&nbsp;</td>
392
                        <td> <input name="key1" type="text" class="formfld unknown" id="key1" size="30" value="<?=htmlspecialchars($pconfig['key1']);?>"></td>
393
                        <td align="center"> <input name="txkey" type="radio" value="1" <? if ($pconfig['txkey'] == 1) echo "checked";?>></td>
394
		</tr>
395
		<tr>
396
                        <td>Key 2:&nbsp;&nbsp;</td>
397
                        <td> <input name="key2" type="text" class="formfld unknown" id="key2" size="30" value="<?=htmlspecialchars($pconfig['key2']);?>"></td>
398
                        <td align="center"> <input name="txkey" type="radio" value="2" <? if ($pconfig['txkey'] == 2) echo "checked";?>></td>
399
		</tr>
400
		<tr>
401
                        <td>Key 3:&nbsp;&nbsp;</td>
402
                        <td> <input name="key3" type="text" class="formfld unknown" id="key3" size="30" value="<?=htmlspecialchars($pconfig['key3']);?>"></td>
403
                        <td align="center"> <input name="txkey" type="radio" value="3" <? if ($pconfig['txkey'] == 3) echo "checked";?>></td>
404
		</tr>
405
		<tr>
406
                        <td>Key 4:&nbsp;&nbsp;</td>
407
                        <td> <input name="key4" type="text" class="formfld unknown" id="key4" size="30" value="<?=htmlspecialchars($pconfig['key4']);?>"></td>
408
                        <td align="center"> <input name="txkey" type="radio" value="4" <? if ($pconfig['txkey'] == 4) echo "checked";?>></td>
409
		</tr>
410
			</table>
411
			<br/>
412
			40 (64) bit keys may be entered as 5 ASCII characters or 10 hex digits preceded by '0x'.<br/>
413
			104 (128) bit keys may be entered as 13 ASCII characters or 26 hex digits preceded by '0x'.
414
		   	</td>
415
                </tr>
416
                <tr>
417
			<td valign="top" class="vncell"><strong>WPA</strong></td>
418
			<td class="vtable"><input name="wpa_enable" type="checkbox" class="formfld" id="wpa_enable" value="yes" <? if ($pconfig['wpa_enable']) echo "checked"; ?>>
419
			<strong>Enable WPA</strong>
420
			<br/><br/>
421
			<table border="0" cellspacing="0" cellpadding="0">
422
			<tr>
423
                        <td>&nbsp;</td>
424
                        <td>&nbsp;WPA Pre Shared Key&nbsp;</td>
425
			</tr>
426
			<tr>
427
			<td>PSK:&nbsp;&nbsp;</td>
428
			<td><input name="passphrase" type="text" class="formfld unknown" id="passphrase" size="66" value="<?=htmlspecialchars($pconfig['passphrase']);?>"></td>
429
			</tr>
430
			</table>
431
			<br/>Passphrase must be from 8 to 63 chars.
432
			</td>
433
	        </tr>
434
		<tr>
435
			<td valign="top" class="vncell">WPA Mode</td>
436
			<td class="vtable"><select name="wpa_mode" class="formselect" id="wpa_mode">
437
			<option <? if ($pconfig['wpa_mode'] == '1') echo "selected";?> value="1">WPA</option>
438
			<option <? if ($pconfig['wpa_mode'] == '2') echo "selected";?> value="2">WPA2</option>
439
			<option <? if ($pconfig['wpa_mode'] == '3') echo "selected";?> value="3">Both</option>
440
			</select>
441
			</td>
442
		</tr>
443
		<tr>
444
			<td valign="top" class="vncell">WPA Key Management Mode</td>
445
			<td class="vtable"><select name="wpa_key_mgmt" class="formselect" id="wpa_key_mgmt">
446
			<option <? if ($pconfig['wpa_key_mgmt'] == 'WPA-PSK') echo "selected";?> value="WPA-PSK">Pre Shared Key</option>
447
			<option <? if ($pconfig['wpa_key_mgmt'] == 'WPA-EAP') echo "selected";?> value="WPA-EAP">Extensible Authentication Protocol</option>
448
			<option <? if ($pconfig['wpa_key_mgmt'] == 'WPA-PSK WPA-EAP') echo "selected";?> value="WPA-PSK WPA-EAP">Both</option>
449
 			</select>
450
			</td>
451
		</tr>
452
		<? /*
453
		<tr>
454
			<td valign="top" class="vncell">Enable MAC Filtering</td>
455
			<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"; ?>>
456
			Setting this option will enable the use of a mac filterlist to allow/deny association based on mac address
457
			<br/><br/>
458
			<select name="macaddr_acl" class="formselect" id="macaddr_acl">
459
                        <option <? if ($pconfig['macaddr_acl'] == '0') echo "selected";?> value="0">Allow</option>
460
			<option <? if ($pconfig['macaddr_acl'] == '1') echo "selected";?> value="1">Deny</option>
461
			<option <? if ($pconfig['macaddr_acl'] == '2') echo "selected";?> value="2">Radius</option>
462
			</select>
463
			<br/><br/>
464
			Setting this to "Allow" will allow all clients in not in deny list, while "Deny" will deny all clients not in allow list.
465
			Radius will cause allow and deny list to be searched and then query radius.</br>
466
			</td>
467
		</tr>
468
		*/ ?>
469
		<tr>
470
			<td valign="top" class="vncell">Authentication</td>
471
			<td class="vtable"><select name="auth_algs" class="formselect" id="auth_algs">
472
			<option <? if ($pconfig['auth_algs'] == '1') echo "selected";?> value="1">Open System Authentication</option>
473
			<option <? if ($pconfig['auth_algs'] == '2') echo "selected";?> value="2">Shared Key Authentication</option>
474
			<option <? if ($pconfig['auth_algs'] == '3') echo "selected";?> value="3">Both</option>
475
			</select>
476
			<br/>Note: Shared Key Authentication requires WEP.</br>
477
			</td>
478
		</tr>
479
		<tr>
480
			<td valign="top" class="vncell">WPA Pairwise</td>
481
			<td class="vtable"><select name="wpa_pairwise" class="formselect" id="wpa_pairwise">
482
			<option <? if ($pconfig['wpa_pairwise'] == 'CCMP TKIP') echo "selected";?> value="CCMP TKIP">Both</option>
483
			<option <? if ($pconfig['wpa_pairwise'] == 'CCMP') echo "selected";?> value="CCMP">AES</option>
484
			<option <? if ($pconfig['wpa_pairwise'] == 'TKIP') echo "selected";?> value="TKIP">TKIP</option>
485
			</select>
486
			</td>
487
		</tr>
488
		<tr>
489
			<td valign="top" class="vncell">Key Rotation</td>
490
			<td class="vtable"><input name="wpa_group_rekey" type="text" class="formfld unknown" id="wpa_group_rekey" size="30" value="<? echo $pconfig['wpa_group_rekey'] ? $pconfig['wpa_group_rekey'] : "60";?>">
491
			<br/>Allowed values are 1-9999 but should not be longer than Master Key Regeneration time.
492
			</td>
493
		</tr>
494
		<tr>
495
			<td valign="top" class="vncell">Master Key Regeneration</td>
496
			<td class="vtable"><input name="wpa_gmk_rekey" type="text" class="formfld" id="wpa_gmk_rekey" size="30" value="<? echo $pconfig['wpa_gmk_rekey'] ? $pconfig['wpa_gmk_rekey'] : "3600";?>">
497
			<br/>Allowed values are 1-9999 but should not be shorter than Key Rotation time.
498
			</td>
499
		</tr>
500
		<tr>
501
			<td valign="top" class="vncell">Strict Key Regeneration</td>
502
			<td class="vtable"><input name="wpa_strict_rekey" type="checkbox" value="yes"  class="formfld" id="wpa_strict_rekey" <? if ($pconfig['wpa_strict_rekey']) echo "checked"; ?>>
503
			<br/>Setting this option will force the AP to rekey whenever a client disassociates.
504
			</td>
505
		</tr>
506
		<tr>
507
			<td valign="top" class="vncell">Enable IEEE802.1X</td>
508
			<td class="vtable"><input name="ieee8021x" type="checkbox" value="yes"  class="formfld" id="ieee8021x" <? if ($pconfig['ieee8021x']) echo "checked";?>>
509
			<br/>Setting this option will enable 802.1x authentication.
510
			</td>
511
		</tr>
512
<? } ?>
(89-89/211)