Project

General

Profile

Download (20.2 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
$wlchannels = array(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,34,36,38,40,42,44,46,48,50,52,56,58,60,64,100,104,108,112,116,120,124,128,132,136,140,149,152,153,157,160,161,165);
33

    
34
function wireless_config_init() {
35
	global $optcfg, $pconfig;
36

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

    
67
	if (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() {
81
	global $optcfg, $pconfig;
82

    
83
	unset($input_errors);
84

    
85
	/* input validation */
86
	if ($_POST['enable']) {
87
		$reqdfields = explode(" ", "mode ssid");
88
		$reqdfieldsn = explode(",", "Mode,SSID");
89
		do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
90
		
91
		if (!$input_errors) {
92
			/* bridge check (hostap only!) */
93
			if ($pconfig['bridge'] && ($pconfig['mode'] != "hostap"))
94
				$input_errors[] = "Bridging a wireless interface is only possible in hostap mode.";
95
		}
96
	}
97

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

    
135
	if (!$input_errors) {
136

    
137
		$optcfg['wireless']['standard'] = $_POST['standard'];
138
		$optcfg['wireless']['mode'] = $_POST['mode'];
139
		$optcfg['wireless']['ssid'] = $_POST['ssid'];
140
		$optcfg['wireless']['stationname'] = $_POST['stationname'];
141
		$optcfg['wireless']['channel'] = $_POST['channel'];
142
		$optcfg['wireless']['authmode'] = $_POST['authmode'];		
143
		$optcfg['wireless']['txpower'] = $_POST['txpower'];
144
		$optcfg['wireless']['distance'] = $_POST['distance'];
145
		$optcfg['wireless']['wpa']['macaddr_acl'] = $_POST['macaddr_acl'];
146
		$optcfg['wireless']['wpa']['auth_algs'] = $_POST['auth_algs'];
147
		$optcfg['wireless']['wpa']['wpa_mode'] = $_POST['wpa_mode'];
148
		$optcfg['wireless']['wpa']['wpa_key_mgmt'] = $_POST['wpa_key_mgmt'];
149
		$optcfg['wireless']['wpa']['wpa_pairwise'] = $_POST['wpa_pairwise'];
150
		$optcfg['wireless']['wpa']['wpa_group_rekey'] = $_POST['wpa_group_rekey'];
151
		$optcfg['wireless']['wpa']['wpa_gmk_rekey'] = $_POST['wpa_gmk_rekey'];
152
		$optcfg['wireless']['wpa']['passphrase'] = $_POST['passphrase'];
153
		$optcfg['wireless']['wpa']['ext_wpa_sw'] = $_POST['ext_wpa_sw'];
154

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

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

    
165
		if($_POST['ieee8021x_enable'] == "yes")
166
			$optcfg['wireless']['wpa']['ieee8021x']['enable'] = true;
167
		else
168
			unset($optcfg['wireless']['wpa']['ieee8021x']['enable']);
169
		
170
		if($_POST['wpa_strict_rekey'] == "yes")
171
			$optcfg['wireless']['wpa']['wpa_strict_rekey'] = true;
172
		else
173
			unset($optcfg['wireless']['wpa']['wpa_strict_rekey']);
174

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

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

    
185
		if($_POST['wep_enable'] == "yes") 
186
			$optcfg['wireless']['wep']['enable'] = $_POST['wep_enable'] = true;
187
		else
188
			unset($optcfg['wireless']['wep']['enable']);
189

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

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

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

    
205
		if($_POST['turbo_enable'] == "yes") 
206
			$optcfg['wireless']['turbo']['enable'] = $_POST['turbo_enable'] = true;
207
		else
208
			unset($optcfg['wireless']['turbo']['enable']);
209

    
210
		$optcfg['wireless']['wep']['key'] = array();
211

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

    
226
function wireless_config_print() {
227
	global $optcfg, $pconfig, $wlchannels, $g;
228
?>
229

    
230
<script language="JavaScript">
231
	function openwindow(url) {
232
		var oWin = window.open(url,"pfSensePop","width=620,height=400,top=150,left=150");
233
		if (oWin==null || typeof(oWin)=="undefined") {
234
			return false;
235
		} else {
236
			return true;
237
		}
238
	}
239
</script>
240
                <tr> 
241
                  <td colspan="2" valign="top" height="16"></td>
242
		</tr>
243

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