Project

General

Profile

Download (36.4 KB) Statistics
| Branch: | Tag: | Revision:
1 99caa67c Seth Mos
<?php
2
/* $Id$ */
3
/*
4
	services_dhcpv6.php
5
	parts of m0n0wall (http://m0n0.ch/wall)
6
7
	Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
8
	All rights reserved.
9
10
	part of pfSense (http://www.pfsense.org)
11
	Copyright (C) 2010 Seth Mos <seth.mos@dds.nl>.
12
	All rights reserved.
13
14
	Redistribution and use in source and binary forms, with or without
15
	modification, are permitted provided that the following conditions are met:
16
17
	1. Redistributions of source code must retain the above copyright notice,
18
	   this list of conditions and the following disclaimer.
19
20
	2. Redistributions in binary form must reproduce the above copyright
21
	   notice, this list of conditions and the following disclaimer in the
22
	   documentation and/or other materials provided with the distribution.
23
24
	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
25
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
26
	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
27
	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
28
	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33
	POSSIBILITY OF SUCH DAMAGE.
34
*/
35
/*
36
	pfSense_BUILDER_BINARIES:	/bin/rm
37
	pfSense_MODULE:	interfaces
38
*/
39
40
##|+PRIV
41
##|*IDENT=page-services-dhcpv6server
42
##|*NAME=Services: DHCPv6 server page
43
##|*DESCR=Allow access to the 'Services: DHCPv6 server' page.
44
##|*MATCH=services_dhcpv6.php*
45
##|-PRIV
46
47
require("guiconfig.inc");
48
49
if(!$g['services_dhcp_server_enable']) {
50
	Header("Location: /");
51
	exit;
52
}
53
54
/*  Fix failover DHCP problem
55
 *  http://article.gmane.org/gmane.comp.security.firewalls.pfsense.support/18749
56
 */
57
ini_set("memory_limit","64M");
58
59
$if = $_GET['if'];
60
if ($_POST['if'])
61
	$if = $_POST['if'];
62
63
/* if OLSRD is enabled, allow WAN to house DHCP. */
64
if($config['installedpackages']['olsrd']) {
65
	foreach($config['installedpackages']['olsrd']['config'] as $olsrd) {
66
			if($olsrd['enable']) {
67
				$is_olsr_enabled = true;
68
				break;
69
			}
70
	}
71
}
72
73
if (!$_GET['if'])
74
	$savemsg = "<b>" . gettext("The DHCPv6 Server can only be enabled on interfaces configured with static IP addresses") . ".<p>" . gettext("Only interfaces configured with a static IP will be shown") . ".</p></b>";
75
76
$iflist = get_configured_interface_with_descr();
77
78
/* set the starting interface */
79
if (!$if || !isset($iflist[$if])) {
80
	foreach ($iflist as $ifent => $ifname) {
81
		$oc = $config['interfaces'][$ifent];
82
		if ((is_array($config['dhcpdv6'][$ifent]) && !isset($config['dhcpdv6'][$ifent]['enable']) && (!is_ipaddrv6($oc['ipaddrv6']))) ||
83
			(!is_array($config['dhcpdv6'][$ifent]) && (!is_ipaddrv6($oc['ipaddrv6']))))
84
			continue;
85
		$if = $ifent;
86
		break;
87
	}
88
}
89
90
if (is_array($config['dhcpdv6'][$if])){
91
	if (is_array($config['dhcpdv6'][$if]['range'])) {
92
		$pconfig['range_from'] = $config['dhcpdv6'][$if]['range']['from'];
93
		$pconfig['range_to'] = $config['dhcpdv6'][$if]['range']['to'];
94
	}
95 bfb3e717 Seth Mos
	if (is_array($config['dhcpdv6'][$if]['prefixrange'])) {
96
		$pconfig['prefixrange_from'] = $config['dhcpdv6'][$if]['prefixrange']['from'];
97
		$pconfig['prefixrange_to'] = $config['dhcpdv6'][$if]['prefixrange']['to'];
98
		$pconfig['prefixrange_length'] = $config['dhcpdv6'][$if]['prefixrange']['prefixlength'];
99
	}
100 656f1763 Seth Mos
	$pconfig['mode'] = $config['dhcpdv6'][$if]['mode'];
101 99caa67c Seth Mos
	$pconfig['deftime'] = $config['dhcpdv6'][$if]['defaultleasetime'];
102
	$pconfig['maxtime'] = $config['dhcpdv6'][$if]['maxleasetime'];
103
	$pconfig['gateway'] = $config['dhcpdv6'][$if]['gateway'];
104
	$pconfig['domain'] = $config['dhcpdv6'][$if]['domain'];
105
	$pconfig['domainsearchlist'] = $config['dhcpdv6'][$if]['domainsearchlist'];
106 13399e17 Seth Mos
	list($pconfig['wins1'],$pconfig['wins2']) = $config['dhcpdv6'][$if]['winsserver'];
107
	list($pconfig['dns1'],$pconfig['dns2']) = $config['dhcpdv6'][$if]['dnsserver'];
108 99caa67c Seth Mos
	$pconfig['enable'] = isset($config['dhcpdv6'][$if]['enable']);
109
	$pconfig['denyunknown'] = isset($config['dhcpdv6'][$if]['denyunknown']);
110
	$pconfig['ddnsdomain'] = $config['dhcpdv6'][$if]['ddnsdomain'];
111
	$pconfig['ddnsupdate'] = isset($config['dhcpdv6'][$if]['ddnsupdate']);
112
	list($pconfig['ntp1'],$pconfig['ntp2']) = $config['dhcpdv6'][$if]['ntpserver'];
113
	$pconfig['tftp'] = $config['dhcpdv6'][$if]['tftp'];
114
	$pconfig['ldap'] = $config['dhcpdv6'][$if]['ldap'];
115
	$pconfig['netboot'] = isset($config['dhcpdv6'][$if]['netboot']);
116
	$pconfig['nextserver'] = $config['dhcpdv6'][$if]['next-server'];
117
	$pconfig['filename'] = $config['dhcpdv6'][$if]['filename'];
118
	$pconfig['rootpath'] = $config['dhcpdv6'][$if]['rootpath'];
119
	$pconfig['failover_peerip'] = $config['dhcpdv6'][$if]['failover_peerip'];
120
	$pconfig['netmask'] = $config['dhcpdv6'][$if]['netmask'];
121
	$pconfig['numberoptions'] = $config['dhcpdv6'][$if]['numberoptions'];
122
	if (!is_array($config['dhcpdv6'][$if]['staticmap']))
123
		$config['dhcpdv6'][$if]['staticmap'] = array();
124
	$a_maps = &$config['dhcpdv6'][$if]['staticmap'];
125
}
126
127
$ifcfgip = get_interface_ipv6($if);
128
$ifcfgsn = get_interface_subnetv6($if);
129
130
/*   set the enabled flag which will tell us if DHCP relay is enabled
131
 *   on any interface. We will use this to disable DHCP server since
132
 *   the two are not compatible with each other.
133
 */
134
135
$dhcrelay_enabled = false;
136
$dhcrelaycfg = $config['dhcrelay'];
137
138
if(is_array($dhcrelaycfg)) {
139
	foreach ($dhcrelaycfg as $dhcrelayif => $dhcrelayifconf) {
140
		if (isset($dhcrelayifconf['enable']) && isset($iflist[$dhcrelayif]) &&
141
			(!link_interface_to_bridge($dhcrelayif)))
142
			$dhcrelay_enabled = true;
143
	}
144
}
145
146
/* FIXME needs v6 code, use in subnet v6? */
147
function is_inrange($test, $start, $end) {
148
	if ( (ip2ulong($test) < ip2ulong($end)) && (ip2ulong($test) > ip2ulong($start)) )
149
		return true;
150
	else
151
		return false;
152
}
153
154 2fb056d8 Seth Mos
$advertise_modes = array("disabled" => "Disabled", "unmanaged" => "Unmanaged", "managed" => "Managed", "assist" => "Assisted");
155 656f1763 Seth Mos
156 99caa67c Seth Mos
if ($_POST) {
157
158
	unset($input_errors);
159
160
	$pconfig = $_POST;
161
162
	$numberoptions = array();
163
	for($x=0; $x<99; $x++) {
164
		if(isset($_POST["number{$x}"]) && ctype_digit($_POST["number{$x}"])) {
165
			$numbervalue = array();
166
			$numbervalue['number'] = htmlspecialchars($_POST["number{$x}"]);
167
			$numbervalue['value'] = htmlspecialchars($_POST["value{$x}"]);
168
			$numberoptions['item'][] = $numbervalue;
169
		}
170
	}
171
	// Reload the new pconfig variable that the forum uses.
172
	$pconfig['numberoptions'] = $numberoptions;
173
174
	/* input validation */
175
	if ($_POST['enable']) {
176
		$reqdfields = explode(" ", "range_from range_to");
177
		$reqdfieldsn = array(gettext("Range begin"),gettext("Range end"));
178
179
		do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
180
181 bfb3e717 Seth Mos
		if (($_POST['prefixrange_from'] && !is_ipaddrv6($_POST['prefixrange_from'])))
182
			$input_errors[] = gettext("A valid range must be specified.");
183
		if (($_POST['prefixrange_to'] && !is_ipaddrv6($_POST['prefixrange_to'])))
184
			$input_errors[] = gettext("A valid prefix range must be specified.");
185
		if (($_POST['range_from'] && !is_ipaddrv6($_POST['prefixrange_from'])))
186 99caa67c Seth Mos
			$input_errors[] = gettext("A valid range must be specified.");
187
		if (($_POST['range_to'] && !is_ipaddrv6($_POST['range_to'])))
188
			$input_errors[] = gettext("A valid range must be specified.");
189
		if (($_POST['gateway'] && !is_ipaddrv6($_POST['gateway'])))
190
			$input_errors[] = gettext("A valid IPv6 address must be specified for the gateway.");
191
		if (($_POST['dns1'] && !is_ipaddrv6($_POST['dns1'])) || ($_POST['dns2'] && !is_ipaddrv6($_POST['dns2'])))
192
			$input_errors[] = gettext("A valid IPv6 address must be specified for the primary/secondary DNS servers.");
193
194
		if ($_POST['deftime'] && (!is_numeric($_POST['deftime']) || ($_POST['deftime'] < 60)))
195
			$input_errors[] = gettext("The default lease time must be at least 60 seconds.");
196
		if ($_POST['maxtime'] && (!is_numeric($_POST['maxtime']) || ($_POST['maxtime'] < 60) || ($_POST['maxtime'] <= $_POST['deftime'])))
197
			$input_errors[] = gettext("The maximum lease time must be at least 60 seconds and higher than the default lease time.");
198
		if (($_POST['ddnsdomain'] && !is_domain($_POST['ddnsdomain'])))
199
			$input_errors[] = gettext("A valid domain name must be specified for the dynamic DNS registration.");
200
		if (($_POST['ntp1'] && !is_ipaddrv6($_POST['ntp1'])) || ($_POST['ntp2'] && !is_ipaddrv6($_POST['ntp2'])))
201
			$input_errors[] = gettext("A valid IPv6 address must be specified for the primary/secondary NTP servers.");
202
		if (($_POST['domain'] && !is_domain($_POST['domain'])))
203
			$input_errors[] = gettext("A valid domain name must be specified for the DNS domain.");
204
		if ($_POST['tftp'] && !is_ipaddr($_POST['tftp']) && !is_domain($_POST['tftp']) && !is_URL($_POST['tftp']))
205
			$input_errors[] = gettext("A valid IPv6 address or hostname must be specified for the TFTP server.");
206
		if (($_POST['nextserver'] && !is_ipaddrv6($_POST['nextserver'])))
207
			$input_errors[] = gettext("A valid IPv6 address must be specified for the network boot server.");
208
209
		// Disallow a range that includes the virtualip
210
		if (is_array($config['virtualip']['vip'])) {
211
			foreach($config['virtualip']['vip'] as $vip) {
212
				if($vip['interface'] == $if)
213
					if($vip['subnetv6'] && is_inrange($vip['subnetv6'], $_POST['range_from'], $_POST['range_to']))
214
						$input_errors[] = sprintf(gettext("The subnet range cannot overlap with virtual IPv6 address %s."),$vip['subnetv6']);
215
			}
216
		}
217
218
		$noip = false;
219
		if(is_array($a_maps))
220
			foreach ($a_maps as $map)
221
				if (empty($map['ipaddrv6']))
222
					$noip = true;
223
		if (!$input_errors) {
224
			/* make sure the range lies within the current subnet */
225
			/* FIXME change for ipv6 subnet */
226
			$subnet_start = gen_subnetv6($ifcfgip, $ifcfgsn);
227
			$subnet_end = gen_subnetv6_max($ifcfgip, $ifcfgsn);
228
229
			if((! ip_in_subnet($_POST['range_from'], $subnet_start)) || (! ip_in_subnet($_POST['range_to'], $subnet_start))) {
230
				$input_errors[] = gettext("The specified range lies outside of the current subnet.");
231
			}
232
233
			/* no idea how to do this yet 
234
			if (ip2ulong($_POST['range_from']) > ip2ulong($_POST['range_to']))
235
				$input_errors[] = gettext("The range is invalid (first element higher than second element).");
236
			*/
237
238
			/* make sure that the DHCP Relay isn't enabled on this interface */
239
			if (isset($config['dhcrelay'][$if]['enable']))
240
				$input_errors[] = sprintf(gettext("You must disable the DHCP relay on the %s interface before enabling the DHCP server."),$iflist[$if]);
241
242
			// $dynsubnet_start = ip2ulong($_POST['range_from']);
243
			// $dynsubnet_end = ip2ulong($_POST['range_to']);
244 bfb3e717 Seth Mos
			/* FIX later. Also applies to prefix delegation
245 99caa67c Seth Mos
			if(is_array($a_maps)) {
246
				foreach ($a_maps as $map) {
247
					if (empty($map['ipaddrv6']))
248
						continue;
249
					if ((ip2ulong($map['ipaddrv6']) > $dynsubnet_start) &&
250
						(ip2ulong($map['ipaddr']) < $dynsubnet_end)) {
251
						$input_errors[] = sprintf(gettext("The DHCP range cannot overlap any static DHCP mappings."));
252
						break;
253
					}
254
				}
255
			}
256
			*/
257
		}
258
	}
259
260
	if (!$input_errors) {
261
		if (!is_array($config['dhcpdv6'][$if]))
262
			$config['dhcpdv6'][$if] = array();
263
		if (!is_array($config['dhcpdv6'][$if]['range']))
264
			$config['dhcpdv6'][$if]['range'] = array();
265 bfb3e717 Seth Mos
		if (!is_array($config['dhcpdv6'][$if]['prefixrange']))
266
			$config['dhcpdv6'][$if]['prefixrange'] = array();
267 99caa67c Seth Mos
268 656f1763 Seth Mos
		$config['dhcpdv6'][$if]['mode'] = $_POST['mode'];
269 99caa67c Seth Mos
		$config['dhcpdv6'][$if]['range']['from'] = $_POST['range_from'];
270
		$config['dhcpdv6'][$if]['range']['to'] = $_POST['range_to'];
271 bfb3e717 Seth Mos
		$config['dhcpdv6'][$if]['prefixrange']['from'] = $_POST['prefixrange_from'];
272
		$config['dhcpdv6'][$if]['prefixrange']['to'] = $_POST['prefixrange_to'];
273
		$config['dhcpdv6'][$if]['prefixrange']['prefixlength'] = $_POST['prefixrange_length'];
274 99caa67c Seth Mos
		$config['dhcpdv6'][$if]['defaultleasetime'] = $_POST['deftime'];
275
		$config['dhcpdv6'][$if]['maxleasetime'] = $_POST['maxtime'];
276
		$config['dhcpdv6'][$if]['netmask'] = $_POST['netmask'];
277
		$previous = $config['dhcpdv6'][$if]['failover_peerip'];
278
		if($previous <> $_POST['failover_peerip'])
279
			mwexec("/bin/rm -rf /var/dhcpd/var/db/*");
280
281
		$config['dhcpdv6'][$if]['failover_peerip'] = $_POST['failover_peerip'];
282
283
		unset($config['dhcpdv6'][$if]['winsserver']);
284
285
		unset($config['dhcpdv6'][$if]['dnsserver']);
286
		if ($_POST['dns1'])
287
			$config['dhcpdv6'][$if]['dnsserver'][] = $_POST['dns1'];
288
		if ($_POST['dns2'])
289
			$config['dhcpdv6'][$if]['dnsserver'][] = $_POST['dns2'];
290
291
		$config['dhcpdv6'][$if]['gateway'] = $_POST['gateway'];
292
		$config['dhcpdv6'][$if]['domain'] = $_POST['domain'];
293
		$config['dhcpdv6'][$if]['domainsearchlist'] = $_POST['domainsearchlist'];
294
		$config['dhcpdv6'][$if]['denyunknown'] = ($_POST['denyunknown']) ? true : false;
295
		$config['dhcpdv6'][$if]['enable'] = ($_POST['enable']) ? true : false;
296
		$config['dhcpdv6'][$if]['ddnsdomain'] = $_POST['ddnsdomain'];
297
		$config['dhcpdv6'][$if]['ddnsupdate'] = ($_POST['ddnsupdate']) ? true : false;
298
299
		unset($config['dhcpdv6'][$if]['ntpserver']);
300
		if ($_POST['ntp1'])
301
			$config['dhcpdv6'][$if]['ntpserver'][] = $_POST['ntp1'];
302
		if ($_POST['ntp2'])
303
			$config['dhcpdv6'][$if]['ntpserver'][] = $_POST['ntp2'];
304
305
		$config['dhcpdv6'][$if]['tftp'] = $_POST['tftp'];
306
		$config['dhcpdv6'][$if]['ldap'] = $_POST['ldap'];
307
		$config['dhcpdv6'][$if]['netboot'] = ($_POST['netboot']) ? true : false;
308
		$config['dhcpdv6'][$if]['next-server'] = $_POST['nextserver'];
309
		$config['dhcpdv6'][$if]['filename'] = $_POST['filename'];
310
		$config['dhcpdv6'][$if]['rootpath'] = $_POST['rootpath'];
311
312
		// Handle the custom options rowhelper
313
		if(isset($config['dhcpdv6'][$if]['numberoptions']['item']))
314
			unset($config['dhcpdv6'][$if]['numberoptions']['item']);
315
316
		$config['dhcpdv6'][$if]['numberoptions'] = $numberoptions;
317
318
		write_config();
319
320
		$retval = 0;
321
		$retvaldhcp = 0;
322
		$retvaldns = 0;
323
		/* Stop DHCPv6 so we can cleanup leases */
324 2fb056d8 Seth Mos
		killbyname("dhcpd -6");
325
		// dhcp_clean_leases();
326 99caa67c Seth Mos
		/* dnsmasq_configure calls dhcpd_configure */
327
		/* no need to restart dhcpd twice */
328
		if (isset($config['dnsmasq']['regdhcpstatic']))	{
329
			$retvaldns = services_dnsmasq_configure();
330
			if ($retvaldns == 0) {
331
				clear_subsystem_dirty('hosts');
332
				clear_subsystem_dirty('staticmaps');
333
			}
334
		} else {
335
			$retvaldhcp = services_dhcpd_configure();
336
			if ($retvaldhcp == 0)
337
				clear_subsystem_dirty('staticmaps');
338
		}
339
		if($retvaldhcp == 1 || $retvaldns == 1)
340
			$retval = 1;
341
		$savemsg = get_std_save_message($retval);
342
	}
343
}
344
345
if ($_GET['act'] == "del") {
346
	if ($a_maps[$_GET['id']]) {
347
		unset($a_maps[$_GET['id']]);
348
		write_config();
349
		if(isset($config['dhcpdv6'][$if]['enable'])) {
350
			mark_subsystem_dirty('staticmapsv6');
351
			if (isset($config['dnsmasq']['regdhcpstaticv6']))
352
				mark_subsystem_dirty('hosts');
353
		}
354
		header("Location: services_dhcpv6.php?if={$if}");
355
		exit;
356
	}
357
}
358
359
$pgtitle = array(gettext("Services"),gettext("DHCPv6 server"));
360 2fb056d8 Seth Mos
$statusurl = "status_dhcpv6_leases.php";
361 99caa67c Seth Mos
$logurl = "diag_logs_dhcp.php";
362
363
include("head.inc");
364
365
?>
366
367
<script type="text/javascript" src="/javascript/row_helper.js">
368
</script>
369
370
<script type="text/javascript">
371
	rowname[0] = "number";
372
	rowtype[0] = "textbox";
373
	rowsize[0] = "10";
374
	rowname[1] = "value";
375
	rowtype[1] = "textbox";
376
	rowsize[1] = "55";
377
</script>
378
379
<script type="text/javascript" language="JavaScript">
380 2fb056d8 Seth Mos
	function enable_change(enable_over) {
381
		var endis;
382
		endis = !(document.iform.enable.checked || enable_over);
383
		document.iform.range_from.disabled = endis;
384
		document.iform.range_to.disabled = endis;
385 bfb3e717 Seth Mos
		document.iform.prefixrange_from.disabled = endis;
386
		document.iform.prefixrange_to.disabled = endis;
387
		document.iform.prefixrange_length.disabled = endis;
388 2fb056d8 Seth Mos
		document.iform.dns1.disabled = endis;
389
		document.iform.dns2.disabled = endis;
390
		document.iform.deftime.disabled = endis;
391
		document.iform.maxtime.disabled = endis;
392
		document.iform.gateway.disabled = endis;
393
		document.iform.failover_peerip.disabled = endis;
394
		document.iform.domain.disabled = endis;
395
		document.iform.domainsearchlist.disabled = endis;
396
		document.iform.ddnsdomain.disabled = endis;
397
		document.iform.ddnsupdate.disabled = endis;
398
		document.iform.ntp1.disabled = endis;
399
		document.iform.ntp2.disabled = endis;
400
		document.iform.tftp.disabled = endis;
401
		document.iform.ldap.disabled = endis;
402
		document.iform.netboot.disabled = endis;
403
		document.iform.nextserver.disabled = endis;
404
		document.iform.filename.disabled = endis;
405
		document.iform.rootpath.disabled = endis;
406
		document.iform.denyunknown.disabled = endis;
407 99caa67c Seth Mos
	}
408
409
	function show_shownumbervalue() {
410
		document.getElementById("shownumbervaluebox").innerHTML='';
411
		aodiv = document.getElementById('shownumbervalue');
412
		aodiv.style.display = "block";
413
	}
414
415
	function show_ddns_config() {
416
		document.getElementById("showddnsbox").innerHTML='';
417
		aodiv = document.getElementById('showddns');
418
		aodiv.style.display = "block";
419
	}
420
421
	function show_ntp_config() {
422
		document.getElementById("showntpbox").innerHTML='';
423
		aodiv = document.getElementById('showntp');
424
		aodiv.style.display = "block";
425
	}
426
427
	function show_tftp_config() {
428
		document.getElementById("showtftpbox").innerHTML='';
429
		aodiv = document.getElementById('showtftp');
430
		aodiv.style.display = "block";
431
	}
432
433
	function show_ldap_config() {
434
		document.getElementById("showldapbox").innerHTML='';
435
		aodiv = document.getElementById('showldap');
436
		aodiv.style.display = "block";
437
	}
438
439
	function show_netboot_config() {
440
		document.getElementById("shownetbootbox").innerHTML='';
441
		aodiv = document.getElementById('shownetboot');
442
		aodiv.style.display = "block";
443
	}
444
</script>
445
446
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
447
<?php include("fbegin.inc"); ?>
448
<form action="services_dhcpv6.php" method="post" name="iform" id="iform">
449
<?php if ($input_errors) print_input_errors($input_errors); ?>
450
<?php if ($savemsg) print_info_box($savemsg); ?>
451
<?php
452
	if ($dhcrelay_enabled) {
453
		echo gettext("DHCP Relay is currently enabled. Cannot enable the DHCP Server service while the DHCP Relay is enabled on any interface.");
454
		include("fend.inc");
455
		echo "</body>";
456
		echo "</html>";
457
		exit;
458
	}
459
?>
460
<?php if (is_subsystem_dirty('staticmaps')): ?><p>
461
<?php print_info_box_np(gettext("The static mapping configuration has been changed") . ".<br>" . gettext("You must apply the changes in order for them to take effect."));?><br>
462
<?php endif; ?>
463
<table width="100%" border="0" cellpadding="0" cellspacing="0">
464
<tr><td>
465
<?php
466
	/* active tabs */
467
	$tab_array = array();
468
	$tabscounter = 0;
469
	$i = 0;
470
	foreach ($iflist as $ifent => $ifname) {
471
		$oc = $config['interfaces'][$ifent];
472
		if ((is_array($config['dhcpdv6'][$ifent]) && !isset($config['dhcpdv6'][$ifent]['enable']) && (!is_ipaddrv6($oc['ipaddrv6']))) ||
473
			(!is_array($config['dhcpdv6'][$ifent]) && (!is_ipaddrv6($oc['ipaddrv6']))))
474
			continue;
475
		if ($ifent == $if)
476
			$active = true;
477
		else
478
			$active = false;
479
		$tab_array[] = array($ifname, $active, "services_dhcpv6.php?if={$ifent}");
480
		$tabscounter++;
481
	}
482
	if ($tabscounter == 0) {
483
		echo "</td></tr></table></form>";
484
		include("fend.inc");
485
		echo "</body>";
486
		echo "</html>";
487
		exit;
488
	}
489
	display_top_tabs($tab_array);
490
?>
491
</td></tr>
492
<tr>
493
<td>
494
	<div id="mainarea">
495
		<table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0">
496
			<tr>
497 2fb056d8 Seth Mos
			<td width="22%" valign="top" class="vncellreq"><?=gettext("Router Advertisements");?></td>
498 656f1763 Seth Mos
			<td width="78%" class="vtable">
499 2fb056d8 Seth Mos
				<select name="mode" id="mode">
500
					<?php foreach($advertise_modes as $name => $value) { ?>
501 656f1763 Seth Mos
					<option value="<?=$name ?>" <?php if ($pconfig['mode'] == $name) echo "selected"; ?> > <?=$value ?></option>
502
					<?php } ?>
503 d5d0c16b Seth Mos
				</select><br />
504 656f1763 Seth Mos
			<strong><?php printf(gettext("Select the Operating Mode. Use Unmanaged for Router Advertising only, Managed for DHCPv6 only, Assisted for Combined"));?></strong></td>
505
			</tr>
506
			<tr>
507 99caa67c Seth Mos
			<td width="22%" valign="top" class="vtable">&nbsp;</td>
508 2fb056d8 Seth Mos
			<td width="78%" class="vtable">
509
				<input name="enable" type="checkbox" value="yes" <?php if ($pconfig['enable']) echo "checked"; ?> onClick="enable_change(false);">
510
			<strong><?php printf(gettext("Enable DHCPv6 server on " .
511
			"%s " .
512
			"interface"),htmlspecialchars($iflist[$if]));?></strong></td>
513
			</tr>
514
			<tr>
515
			<td width="22%" valign="top" class="vtable">&nbsp;</td>
516 99caa67c Seth Mos
			<td width="78%" class="vtable">
517
				<input name="denyunknown" id="denyunknown" type="checkbox" value="yes" <?php if ($pconfig['denyunknown']) echo "checked"; ?>>
518
				<strong><?=gettext("Deny unknown clients");?></strong><br>
519
				<?=gettext("If this is checked, only the clients defined below will get DHCP leases from this server. ");?></td>
520
			</tr>
521
			<tr>
522
			<td width="22%" valign="top" class="vncellreq"><?=gettext("Subnet");?></td>
523
			<td width="78%" class="vtable">
524
				<?=gen_subnetv6($ifcfgip, $ifcfgsn);?>
525
			</td>
526
			</tr>
527
			<tr>
528
			<td width="22%" valign="top" class="vncellreq"><?=gettext("Subnet mask");?></td>
529
			<td width="78%" class="vtable">
530
				<?=$ifcfgsn;?> bits
531
			</td>
532
			</tr>
533
			<tr>
534
			<td width="22%" valign="top" class="vncellreq"><?=gettext("Available range");?></td>
535
			<td width="78%" class="vtable">
536
			<?php
537
				$range_from = gen_subnetv6($ifcfgip, $ifcfgsn);
538
				$range_from++;
539
				echo $range_from;
540
541
			?>
542
			-
543
			<?php
544
				/* FIXME end of subnet calculation here */
545
				$range_to = gen_subnetv6_max($ifcfgip, $ifcfgsn);;
546
				echo $range_to;
547
			?>
548
			</td>
549
			</tr>
550
			<?php if($is_olsr_enabled): ?>
551
			<tr>
552
			<td width="22%" valign="top" class="vncellreq"><?=gettext("Subnet Mask");?></td>
553
			<td width="78%" class="vtable">
554
				<select name="netmask" class="formselect" id="netmask">
555
				<?php
556 8a3b09ef Seth Mos
				for ($i = 128; $i > 0; $i--) {
557
					if($i <> 127) {
558 99caa67c Seth Mos
						echo "<option value=\"{$i}\" ";
559
						if ($i == $pconfig['netmask']) echo "selected";
560
						echo ">" . $i . "</option>";
561
					}
562
				}
563
				?>
564
				</select>
565
			</td>
566
			</tr>
567
			<?php endif; ?>
568
			<tr>
569
			<td width="22%" valign="top" class="vncellreq"><?=gettext("Range");?></td>
570
			<td width="78%" class="vtable">
571 8a3b09ef Seth Mos
				<input name="range_from" type="text" class="formfld unknown" id="range_from" size="28" value="<?=htmlspecialchars($pconfig['range_from']);?>">
572
				&nbsp;<?=gettext("to"); ?>&nbsp; <input name="range_to" type="text" class="formfld unknown" id="range_to" size="28" value="<?=htmlspecialchars($pconfig['range_to']);?>">
573 99caa67c Seth Mos
			</td>
574
			</tr>
575
			<tr>
576 bfb3e717 Seth Mos
			<td width="22%" valign="top" class="vncellreq"><?=gettext("Prefix Delegation Range");?></td>
577
			<td width="78%" class="vtable">
578
				<input name="prefixrange_from" type="text" class="formfld unknown" id="prefixrange_from" size="28" value="<?=htmlspecialchars($pconfig['prefixrange_from']);?>">
579
				&nbsp;<?=gettext("to"); ?>&nbsp; <input name="prefixrange_to" type="text" class="formfld unknown" id="prefixrange_to" size="28" value="<?=htmlspecialchars($pconfig['prefixrange_to']);?>">
580
				&nbsp;<?=gettext("prefix length"); ?>&nbsp; <select name="prefixrange_length" class="formselect" id="prefixrange_length">
581
					<option value="48" <?php if($pconfig['prefixrange_length'] == 48) echo "selected"; ?>>48</option>
582
					<option value="56" <?php if($pconfig['prefixrange_length'] == 56) echo "selected"; ?>>56</option>
583
					<option value="60" <?php if($pconfig['prefixrange_length'] == 60) echo "selected"; ?>>60</option>
584
				</select> <br/>
585
				<?php echo gettext("You can define a Prefix range here for DHCP Prefix Delegation. This allows for 
586
					assigning networks to subrouters"); ?>
587
			</td>
588
			</tr>
589
			<tr>
590 99caa67c Seth Mos
			<td width="22%" valign="top" class="vncell"><?=gettext("DNS servers");?></td>
591
			<td width="78%" class="vtable">
592 8a3b09ef Seth Mos
				<input name="dns1" type="text" class="formfld unknown" id="dns1" size="28" value="<?=htmlspecialchars($pconfig['dns1']);?>"><br>
593
				<input name="dns2" type="text" class="formfld unknown" id="dns2" size="28" value="<?=htmlspecialchars($pconfig['dns2']);?>"><br>
594 99caa67c Seth Mos
				<?=gettext("NOTE: leave blank to use the system default DNS servers - this interface's IP if DNS forwarder is enabled, otherwise the servers configured on the General page.");?>
595
			</td>
596
			</tr>
597
			<tr>
598
			<td width="22%" valign="top" class="vncell"><?=gettext("Gateway");?></td>
599
			<td width="78%" class="vtable">
600 8a3b09ef Seth Mos
				<input name="gateway" type="text" class="formfld host" id="gateway" size="28" value="<?=htmlspecialchars($pconfig['gateway']);?>"><br>
601 99caa67c Seth Mos
			 	 <?=gettext("The default is to use the IP on this interface of the firewall as the gateway. Specify an alternate gateway here if this is not the correct gateway for your network.");?>
602
			</td>
603
			</tr>
604
			<tr>
605
			<td width="22%" valign="top" class="vncell"><?=gettext("Domain name");?></td>
606
			<td width="78%" class="vtable">
607 8a3b09ef Seth Mos
				<input name="domain" type="text" class="formfld unknown" id="domain" size="28" value="<?=htmlspecialchars($pconfig['domain']);?>"><br>
608 99caa67c Seth Mos
				 <?=gettext("The default is to use the domain name of this system as the default domain name provided by DHCP. You may specify an alternate domain name here.");?>
609
			 </td>
610
			</tr>
611
			<tr>
612
			<td width="22%" valign="top" class="vncell"><?=gettext("Domain search list");?></td>
613
			<td width="78%" class="vtable">
614 8a3b09ef Seth Mos
				<input name="domainsearchlist" type="text" class="formfld unknown" id="domainsearchlist" size="28" value="<?=htmlspecialchars($pconfig['domainsearchlist']);?>"><br>
615 99caa67c Seth Mos
				<?=gettext("The DHCP server can optionally provide a domain search list.");?>
616
			</td>
617
			</tr>
618
			<tr>
619
			<td width="22%" valign="top" class="vncell"><?=gettext("Default lease time");?></td>
620
			<td width="78%" class="vtable">
621
				<input name="deftime" type="text" class="formfld unknown" id="deftime" size="10" value="<?=htmlspecialchars($pconfig['deftime']);?>">
622
				<?=gettext("seconds");?><br>
623
				<?=gettext("This is used for clients that do not ask for a specific " .
624
				"expiration time."); ?><br>
625
				<?=gettext("The default is 7200 seconds.");?>
626
			</td>
627
			</tr>
628
			<tr>
629
			<td width="22%" valign="top" class="vncell"><?=gettext("Maximum lease time");?></td>
630
			<td width="78%" class="vtable">
631
				<input name="maxtime" type="text" class="formfld unknown" id="maxtime" size="10" value="<?=htmlspecialchars($pconfig['maxtime']);?>">
632
				<?=gettext("seconds");?><br>
633
				<?=gettext("This is the maximum lease time for clients that ask".
634
				" for a specific expiration time."); ?><br>
635
				<?=gettext("The default is 86400 seconds.");?>
636
			</td>
637
			</tr>
638
			<tr>
639
			<td width="22%" valign="top" class="vncell"><?=gettext("Failover peer IP:");?></td>
640
			<td width="78%" class="vtable">
641 8a3b09ef Seth Mos
				<input name="failover_peerip" type="text" class="formfld host" id="failover_peerip" size="28" value="<?=htmlspecialchars($pconfig['failover_peerip']);?>"><br>
642 99caa67c Seth Mos
				<?=gettext("Leave blank to disable.  Enter the interface IP address of the other machine.  Machines must be using CARP.");?>
643
			</td>
644
			</tr>
645
			<tr>
646
			<td width="22%" valign="top" class="vncell"><?=gettext("Dynamic DNS");?></td>
647
			<td width="78%" class="vtable">
648
				<div id="showddnsbox">
649
					<input type="button" onClick="show_ddns_config()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show Dynamic DNS");?></a>
650
				</div>
651
				<div id="showddns" style="display:none">
652
					<input valign="middle" type="checkbox" value="yes" name="ddnsupdate" id="ddnsupdate" <?php if($pconfig['ddnsupdate']) echo " checked"; ?>>&nbsp;
653
					<b><?=gettext("Enable registration of DHCP client names in DNS.");?></b><br />
654
					<p>
655 8a3b09ef Seth Mos
					<input name="ddnsdomain" type="text" class="formfld unknown" id="ddnsdomain" size="28" value="<?=htmlspecialchars($pconfig['ddnsdomain']);?>"><br />
656 99caa67c Seth Mos
					<?=gettext("Note: Leave blank to disable dynamic DNS registration.");?><br />
657
					<?=gettext("Enter the dynamic DNS domain which will be used to register client names in the DNS server.");?>
658
				</div>
659
			</td>
660
			</tr>
661
			<tr>
662
			<td width="22%" valign="top" class="vncell"><?=gettext("NTP servers");?></td>
663
			<td width="78%" class="vtable">
664
				<div id="showntpbox">
665
					<input type="button" onClick="show_ntp_config()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show NTP configuration");?></a>
666
				</div>
667
				<div id="showntp" style="display:none">
668 8a3b09ef Seth Mos
					<input name="ntp1" type="text" class="formfld unknown" id="ntp1" size="28" value="<?=htmlspecialchars($pconfig['ntp1']);?>"><br>
669
					<input name="ntp2" type="text" class="formfld unknown" id="ntp2" size="28" value="<?=htmlspecialchars($pconfig['ntp2']);?>">
670 99caa67c Seth Mos
				</div>
671
			</td>
672
			</tr>
673
			<tr>
674
			<td width="22%" valign="top" class="vncell"><?=gettext("TFTP server");?></td>
675
			<td width="78%" class="vtable">
676
			<div id="showtftpbox">
677
				<input type="button" onClick="show_tftp_config()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show TFTP configuration");?></a>
678
			</div>
679
			<div id="showtftp" style="display:none">
680
				<input name="tftp" type="text" class="formfld unknown" id="tftp" size="50" value="<?=htmlspecialchars($pconfig['tftp']);?>"><br>
681
				<?=gettext("Leave blank to disable.  Enter a full hostname or IP for the TFTP server.");?>
682
			</div>
683
			</td>
684
			</tr>
685
			<tr>
686
			<td width="22%" valign="top" class="vncell"><?=gettext("LDAP URI");?></td>
687
			<td width="78%" class="vtable">
688
				<div id="showldapbox">
689
					<input type="button" onClick="show_ldap_config()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show LDAP configuration");?></a>
690
				</div>
691
				<div id="showldap" style="display:none">
692
					<input name="ldap" type="text" class="formfld unknown" id="ldap" size="80" value="<?=htmlspecialchars($pconfig['ldap']);?>"><br>
693
					<?=gettext("Leave blank to disable.  Enter a full URI for the LDAP server in the form ldap://ldap.example.com/dc=example,dc=com");?>
694
				</div>
695
			</td>
696
			</tr>
697
			<tr>
698
			<td width="22%" valign="top" class="vncell"><?=gettext("Enable network booting");?></td>
699
			<td width="78%" class="vtable">
700
				<div id="shownetbootbox">
701
					<input type="button" onClick="show_netboot_config()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show Network booting");?></a>
702
				</div>
703
				<div id="shownetboot" style="display:none">
704
					<input valign="middle" type="checkbox" value="yes" name="netboot" id="netboot" <?php if($pconfig['netboot']) echo " checked"; ?>>&nbsp;
705
					<b><?=gettext("Enables network booting.");?></b>
706
					<p>
707
					<?=gettext("Enter the IP of the"); ?> <b><?=gettext("next-server"); ?></b>
708 8a3b09ef Seth Mos
					<input name="nextserver" type="text" class="formfld unknown" id="nextserver" size="28" value="<?=htmlspecialchars($pconfig['nextserver']);?>">
709 99caa67c Seth Mos
					<?=gettext("and the filename");?>
710 8a3b09ef Seth Mos
					<input name="filename" type="text" class="formfld unknown" id="filename" size="28" value="<?=htmlspecialchars($pconfig['filename']);?>"><br>
711 99caa67c Seth Mos
					<?=gettext("Note: You need both a filename and a boot server configured for this to work!");?>
712
					<p>
713
					<?=gettext("Enter the"); ?> <b><?=gettext("root-path"); ?></b>-<?=gettext("string");?>
714
					<input name="rootpath" type="text" class="formfld unknown" id="rootpath" size="90" value="<?=htmlspecialchars($pconfig['rootpath']);?>"><br>
715
					<?=gettext("Note: string-format: iscsi:(servername):(protocol):(port):(LUN):targetname");?>
716
				</div>
717
			</td>
718
			</tr>
719
			<tr>
720
			<td width="22%" valign="top" class="vncell"><?=gettext("Additional BOOTP/DHCP Options");?></td>
721
			<td width="78%" class="vtable">
722
				<div id="shownumbervaluebox">
723
					<input type="button" onClick="show_shownumbervalue()" value="<?=gettext("Advanced");?>"></input> - <?=gettext("Show Additional BOOTP/DHCP Options");?></a>
724
				</div>
725
				<div id="shownumbervalue" style="display:none">
726
				<table id="maintable">
727
				<tbody>
728
				<tr>
729
				<td colspan="3">
730
					<div style="padding:5px; margin-top: 16px; margin-bottom: 16px; border:1px dashed #000066; background-color: #ffffff; color: #000000; font-size: 8pt;" id="itemhelp">
731
					<?=gettext("Enter the DHCP option number and the value for each item you would like to include in the DHCP lease information.  For a list of available options please visit this"); ?> <a href="http://www.iana.org/assignments/bootp-dhcp-parameters/" target="_new"><?=gettext("URL"); ?></a>
732
					</div>
733
				</td>
734
				</tr>
735
				<tr>
736
				<td><div id="onecolumn"><?=gettext("Number");?></div></td>
737
				<td><div id="twocolumn"><?=gettext("Value");?></div></td>
738
				</tr>
739
				<?php $counter = 0; ?>
740
				<?php
741
					if($pconfig['numberoptions'])
742
						foreach($pconfig['numberoptions']['item'] as $item):
743
				?>
744
					<?php
745
						$number = $item['number'];
746
						$value = $item['value'];
747
					?>
748
				<tr>
749
				<td>
750
					<input autocomplete="off" name="number<?php echo $counter; ?>" type="text" class="formfld" id="number<?php echo $counter; ?>" size="10" value="<?=htmlspecialchars($number);?>" />
751
				</td>
752
				<td>
753
					<input autocomplete="off" name="value<?php echo $counter; ?>" type="text" class="formfld" id="value<?php echo $counter; ?>" size="55" value="<?=htmlspecialchars($value);?>" />
754
				</td>
755
				<td>
756
					<input type="image" src="/themes/<?echo $g['theme'];?>/images/icons/icon_x.gif" onclick="removeRow(this); return false;" value="<?=gettext("Delete");?>" />
757
				</td>
758
				</tr>
759
				<?php $counter++; ?>
760
				<?php endforeach; ?>
761
				</tbody>
762
				<tfoot>
763
				</tfoot>
764
				</table>
765
				<a onclick="javascript:addRowTo('maintable', 'formfldalias'); return false;" href="#">
766
					<img border="0" src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" alt="" title="<?=gettext("add another entry");?>" />
767
				</a>
768
				<script type="text/javascript">
769
					field_counter_js = 2;
770
					rows = 1;
771
					totalrows = <?php echo $counter; ?>;
772
					loaded = <?php echo $counter; ?>;
773
				</script>
774
				</div>
775
776
				</td>
777
			</tr>
778
			<tr>
779
			<td width="22%" valign="top">&nbsp;</td>
780
			<td width="78%">
781
				<input name="if" type="hidden" value="<?=$if;?>">
782 2fb056d8 Seth Mos
				<input name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" onclick="enable_change(true)">
783 99caa67c Seth Mos
			</td>
784
			</tr>
785
			<tr>
786
			<td width="22%" valign="top">&nbsp;</td>
787
			<td width="78%"> <p><span class="vexpl"><span class="red"><strong><?=gettext("Note:");?><br>
788
				</strong></span><?=gettext("The DNS servers entered in"); ?> <a href="system.php"><?=gettext("System: " .
789
				"General setup"); ?></a> <?=gettext("(or the"); ?> <a href="services_dnsmasq.php"><?=gettext("DNS " .
790
				"forwarder"); ?></a>, <?=gettext("if enabled)"); ?> </span><span class="vexpl"><?=gettext("will " .
791
				"be assigned to clients by the DHCP server."); ?><br>
792
				<br>
793
				<?=gettext("The DHCP lease table can be viewed on the"); ?> <a href="status_dhcp_leases.php"><?=gettext("Status: " .
794
				"DHCP leases"); ?></a> <?=gettext("page."); ?><br>
795
				</span></p>
796
			</td>
797
			</tr>
798
		</table>
799
		<table class="tabcont" width="100%" border="0" cellpadding="0" cellspacing="0">
800
		<tr>
801 2fb056d8 Seth Mos
			<td width="25%" class="listhdrr"><?=gettext("DUID");?></td>
802
			<td width="15%" class="listhdrr"><?=gettext("IPv6 address");?></td>
803 99caa67c Seth Mos
			<td width="20%" class="listhdrr"><?=gettext("Hostname");?></td>
804
			<td width="30%" class="listhdr"><?=gettext("Description");?></td>
805
			<td width="10%" class="list">
806
			<table border="0" cellspacing="0" cellpadding="1">
807
			<tr>
808
			<td valign="middle" width="17"></td>
809 aed47758 Seth Mos
			<td valign="middle"><a href="services_dhcpv6_edit.php?if=<?=$if;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0"></a></td>
810 99caa67c Seth Mos
			</tr>
811
			</table>
812
			</td>
813
		</tr>
814
			<?php if(is_array($a_maps)): ?>
815
			<?php $i = 0; foreach ($a_maps as $mapent): ?>
816 2fb056d8 Seth Mos
			<?php if($mapent['duid'] <> "" or $mapent['ipaddrv6'] <> ""): ?>
817 99caa67c Seth Mos
		<tr>
818 aed47758 Seth Mos
		<td class="listlr" ondblclick="document.location='services_dhcpv6_edit.php?if=<?=$if;?>&id=<?=$i;?>';">
819 2fb056d8 Seth Mos
			<?=htmlspecialchars($mapent['duid']);?>
820 99caa67c Seth Mos
		</td>
821 aed47758 Seth Mos
		<td class="listr" ondblclick="document.location='services_dhcpv6_edit.php?if=<?=$if;?>&id=<?=$i;?>';">
822 4e8e7662 Seth Mos
			<?=htmlspecialchars($mapent['ipaddrv6']);?>&nbsp;
823 99caa67c Seth Mos
		</td>
824 aed47758 Seth Mos
		<td class="listr" ondblclick="document.location='services_dhcpv6_edit.php?if=<?=$if;?>&id=<?=$i;?>';">
825 99caa67c Seth Mos
			<?=htmlspecialchars($mapent['hostname']);?>&nbsp;
826
		</td>
827 aed47758 Seth Mos
		<td class="listbg" ondblclick="document.location='services_dhcpv6_edit.php?if=<?=$if;?>&id=<?=$i;?>';">
828 99caa67c Seth Mos
			<?=htmlspecialchars($mapent['descr']);?>&nbsp;
829
		</td>
830
		<td valign="middle" nowrap class="list">
831
			<table border="0" cellspacing="0" cellpadding="1">
832
			<tr>
833 aed47758 Seth Mos
			<td valign="middle"><a href="services_dhcpv6_edit.php?if=<?=$if;?>&id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" width="17" height="17" border="0"></a></td>
834 d2627d7c Seth Mos
			<td valign="middle"><a href="services_dhcpv6.php?if=<?=$if;?>&act=del&id=<?=$i;?>" onclick="return confirm('<?=gettext("Do you really want to delete this mapping?");?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0"></a></td>
835 99caa67c Seth Mos
			</tr>
836
			</table>
837
		</td>
838
		</tr>
839
		<?php endif; ?>
840
		<?php $i++; endforeach; ?>
841
		<?php endif; ?>
842
		<tr>
843
		<td class="list" colspan="4"></td>
844
		<td class="list">
845
			<table border="0" cellspacing="0" cellpadding="1">
846
			<tr>
847
			<td valign="middle" width="17"></td>
848 aed47758 Seth Mos
			<td valign="middle"><a href="services_dhcpv6_edit.php?if=<?=$if;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0"></a></td>
849 99caa67c Seth Mos
			</tr>
850
			</table>
851
		</td>
852
		</tr>
853
		</table>
854
	</div>
855
</td>
856
</tr>
857
</table>
858
</form>
859
<script language="JavaScript">
860
<!--
861
enable_change(false);
862
//-->
863
</script>
864
<?php include("fend.inc"); ?>
865
</body>
866
</html>