Project

General

Profile

Download (21 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() {
33
	global $optcfg, $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
	$pconfig['debug_mode'] = $optcfg['wireless']['wpa']['debug_mode'];
48
	$pconfig['macaddr_acl'] = $optcfg['wireless']['wpa']['macaddr_acl'];
49
	$pconfig['mac_acl_enable'] = isset($optcfg['wireless']['wpa']['mac_acl_enable']);
50
	$pconfig['auth_algs'] = $optcfg['wireless']['wpa']['auth_algs'];
51
	$pconfig['wpa_mode'] = $optcfg['wireless']['wpa']['wpa_mode'];
52
	$pconfig['wpa_key_mgmt'] = $optcfg['wireless']['wpa']['wpa_key_mgmt'];
53
	$pconfig['wpa_pairwise'] = $optcfg['wireless']['wpa']['wpa_pairwise'];
54
	$pconfig['wpa_group_rekey'] = $optcfg['wireless']['wpa']['wpa_group_rekey'];
55
	$pconfig['wpa_gmk_rekey'] = $optcfg['wireless']['wpa']['wpa_gmk_rekey'];
56
	$pconfig['wpa_strict_rekey'] = isset($optcfg['wireless']['wpa']['wpa_strict_rekey']);
57
	$pconfig['passphrase'] = $optcfg['wireless']['wpa']['passphrase'];
58
	$pconfig['ieee8021x_enable'] = isset($optcfg['wireless']['wpa']['ieee8021x']['enable']);
59
	$pconfig['ext_wpa_sw'] = $optcfg['wireless']['wpa']['ext_wpa_sw'];
60
	$pconfig['wpa_enable'] = isset($optcfg['wireless']['wpa']['enable']);
61
	$pconfig['wep_enable'] = isset($optcfg['wireless']['wep']['enable']);
62
	$pconfig['mac_acl'] = $optcfg['wireless']['mac_acl'];
63

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

    
77
function wireless_config_post() {
78
	global $optcfg, $pconfig;
79

    
80
	$input_errors = "";
81
	unset($input_errors);
82

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

    
89
		if (!$input_errors) {
90
			/* bridge check (hostap only!) */
91
			if ($pconfig['bridge'] && ($pconfig['mode'] != "hostap"))
92
				$input_errors[] = "Bridging a wireless interface is only possible in hostap mode.";
93
		}
94
	}
95

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

    
133
	if (!$input_errors) {
134

    
135
		$optcfg['wireless']['standard'] = $_POST['standard'];
136
		$optcfg['wireless']['mode'] = $_POST['mode'];
137
		$optcfg['wireless']['protmode'] = $_POST['protmode'];
138
		$optcfg['wireless']['ssid'] = $_POST['ssid'];
139
		$optcfg['wireless']['channel'] = $_POST['channel'];
140
		$optcfg['wireless']['authmode'] = $_POST['authmode'];
141
		$optcfg['wireless']['txpower'] = $_POST['txpower'];
142
		$optcfg['wireless']['distance'] = $_POST['distance'];
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
			$optcfg['wireless']['wep']['enable'] = $_POST['wep_enable'] = true;
185
		else
186
			unset($optcfg['wireless']['wep']['enable']);
187

    
188
		if($_POST['wme_enable'] == "yes")
189
			$optcfg['wireless']['wme']['enable'] = $_POST['wme_enable'] = true;
190
		else
191
			unset($optcfg['wireless']['wme']['enable']);
192

    
193
		if($_POST['pureg_enable'] == "yes")
194
			$optcfg['wireless']['pureg']['enable'] = $_POST['pureg_enable'] = true;
195
		else
196
			unset($optcfg['wireless']['pureg']['enable']);
197

    
198
		if($_POST['apbridge_enable'] == "yes")
199
			$optcfg['wireless']['apbridge']['enable'] = $_POST['apbridge_enable'] = true;
200
		else
201
			unset($optcfg['wireless']['apbridge']['enable']);
202

    
203
		if($_POST['standard'] == "11a Turbo")
204
			$optcfg['wireless']['turbo']['enable'] = true;
205
		else
206
			unset($optcfg['wireless']['turbo']['enable']);
207

    
208
		$optcfg['wireless']['wep']['key'] = array();
209

    
210
		for ($i = 1; $i <= 4; $i++) {
211
			if ($_POST['key' . $i]) {
212
				$newkey = array();
213
				$newkey['value'] = $_POST['key' . $i];
214
				if ($_POST['txkey'] == $i)
215
					$newkey['txkey'] = true;
216
				$optcfg['wireless']['wep']['key'][] = $newkey;
217
			}
218
		}
219
	}
220

    
221
	return $input_errors;
222
}
223

    
224
if($wancfg['if'])
225
	$curif = $lancfg['if'];
226
if($wancfg['if'])
227
	$curif = $lancfg['if'];
228
if($optcfg['if'])
229
	$curif = $optcfg['if'];
230

    
231
$wl_modes = get_wireless_modes($curif);
232

    
233
function wireless_config_print() {
234
	global $optcfg, $pconfig, $wl_modes, $g;
235
?>
236

    
237
<script language="JavaScript">
238
	function openwindow(url) {
239
		var oWin = window.open(url,"pfSensePop","width=620,height=400,top=150,left=150");
240
		if (oWin==null || typeof(oWin)=="undefined") {
241
			return false;
242
		} else {
243
			return true;
244
		}
245
	}
246
</script>
247
                <tr>
248
                  <td colspan="2" valign="top" height="16"></td>
249
		</tr>
250

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