92 |
92 |
$pconfig['range_from'] = $config['dhcpdv6'][$if]['range']['from'];
|
93 |
93 |
$pconfig['range_to'] = $config['dhcpdv6'][$if]['range']['to'];
|
94 |
94 |
}
|
|
95 |
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 |
}
|
95 |
100 |
$pconfig['mode'] = $config['dhcpdv6'][$if]['mode'];
|
96 |
101 |
$pconfig['deftime'] = $config['dhcpdv6'][$if]['defaultleasetime'];
|
97 |
102 |
$pconfig['maxtime'] = $config['dhcpdv6'][$if]['maxleasetime'];
|
... | ... | |
173 |
178 |
|
174 |
179 |
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
|
175 |
180 |
|
176 |
|
if (($_POST['range_from'] && !is_ipaddrv6($_POST['range_from'])))
|
|
181 |
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'])))
|
177 |
186 |
$input_errors[] = gettext("A valid range must be specified.");
|
178 |
187 |
if (($_POST['range_to'] && !is_ipaddrv6($_POST['range_to'])))
|
179 |
188 |
$input_errors[] = gettext("A valid range must be specified.");
|
... | ... | |
197 |
206 |
if (($_POST['nextserver'] && !is_ipaddrv6($_POST['nextserver'])))
|
198 |
207 |
$input_errors[] = gettext("A valid IPv6 address must be specified for the network boot server.");
|
199 |
208 |
|
200 |
|
if(gen_subnet($ifcfgip, $ifcfgsn) == $_POST['range_from'])
|
201 |
|
$input_errors[] = gettext("You cannot use the network address in the starting subnet range.");
|
202 |
|
if(gen_subnet_max($ifcfgip, $ifcfgsn) == $_POST['range_to'])
|
203 |
|
$input_errors[] = gettext("You cannot use the broadcast address in the ending subnet range.");
|
204 |
|
|
205 |
209 |
// Disallow a range that includes the virtualip
|
206 |
210 |
if (is_array($config['virtualip']['vip'])) {
|
207 |
211 |
foreach($config['virtualip']['vip'] as $vip) {
|
... | ... | |
237 |
241 |
|
238 |
242 |
// $dynsubnet_start = ip2ulong($_POST['range_from']);
|
239 |
243 |
// $dynsubnet_end = ip2ulong($_POST['range_to']);
|
240 |
|
/* FIX later.
|
|
244 |
/* FIX later. Also applies to prefix delegation
|
241 |
245 |
if(is_array($a_maps)) {
|
242 |
246 |
foreach ($a_maps as $map) {
|
243 |
247 |
if (empty($map['ipaddrv6']))
|
... | ... | |
258 |
262 |
$config['dhcpdv6'][$if] = array();
|
259 |
263 |
if (!is_array($config['dhcpdv6'][$if]['range']))
|
260 |
264 |
$config['dhcpdv6'][$if]['range'] = array();
|
|
265 |
if (!is_array($config['dhcpdv6'][$if]['prefixrange']))
|
|
266 |
$config['dhcpdv6'][$if]['prefixrange'] = array();
|
261 |
267 |
|
262 |
268 |
$config['dhcpdv6'][$if]['mode'] = $_POST['mode'];
|
263 |
269 |
$config['dhcpdv6'][$if]['range']['from'] = $_POST['range_from'];
|
264 |
270 |
$config['dhcpdv6'][$if]['range']['to'] = $_POST['range_to'];
|
|
271 |
$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'];
|
265 |
274 |
$config['dhcpdv6'][$if]['defaultleasetime'] = $_POST['deftime'];
|
266 |
275 |
$config['dhcpdv6'][$if]['maxleasetime'] = $_POST['maxtime'];
|
267 |
276 |
$config['dhcpdv6'][$if]['netmask'] = $_POST['netmask'];
|
... | ... | |
373 |
382 |
endis = !(document.iform.enable.checked || enable_over);
|
374 |
383 |
document.iform.range_from.disabled = endis;
|
375 |
384 |
document.iform.range_to.disabled = endis;
|
|
385 |
document.iform.prefixrange_from.disabled = endis;
|
|
386 |
document.iform.prefixrange_to.disabled = endis;
|
|
387 |
document.iform.prefixrange_length.disabled = endis;
|
376 |
388 |
document.iform.dns1.disabled = endis;
|
377 |
389 |
document.iform.dns2.disabled = endis;
|
378 |
390 |
document.iform.deftime.disabled = endis;
|
... | ... | |
561 |
573 |
</td>
|
562 |
574 |
</tr>
|
563 |
575 |
<tr>
|
|
576 |
<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 |
<?=gettext("to"); ?> <input name="prefixrange_to" type="text" class="formfld unknown" id="prefixrange_to" size="28" value="<?=htmlspecialchars($pconfig['prefixrange_to']);?>">
|
|
580 |
<?=gettext("prefix length"); ?> <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>
|
564 |
590 |
<td width="22%" valign="top" class="vncell"><?=gettext("DNS servers");?></td>
|
565 |
591 |
<td width="78%" class="vtable">
|
566 |
592 |
<input name="dns1" type="text" class="formfld unknown" id="dns1" size="28" value="<?=htmlspecialchars($pconfig['dns1']);?>"><br>
|
Add a prefix pool for prefix delegation. Doesn't work yet. ISC dhcpd complaining about the network mask being too short.