Revision 6dcbd1b3
Added by Seth Mos almost 12 years ago
etc/inc/interfaces.inc | ||
---|---|---|
3427 | 3427 |
$dhcp6cconf .= " script \"{$g['varetc_path']}/dhcp6c_{$interface}_script.sh\"; # we'd like some nameservers please\n"; |
3428 | 3428 |
$dhcp6cconf .= "};\n"; |
3429 | 3429 |
} else { |
3430 |
|
|
3430 |
/* skip address request if this is set */ |
|
3431 |
if(!isset($wancfg['dhcp6prefixonly'])) |
|
3432 |
$dhcp6cconf .= " send ia-na 0; # request stateful address\n"; |
|
3431 | 3433 |
$dhcp6cconf .= " send ia-na 0; # request stateful address\n"; |
3432 | 3434 |
if(is_numeric($wancfg['dhcp6-ia-pd-len'])) |
3433 | 3435 |
$dhcp6cconf .= " send ia-pd 0; # request prefix delegation\n"; |
3434 |
$dhcp6cconf .= "request domain-name-servers;\n"; |
|
3435 |
$dhcp6cconf .= "request domain-name;\n"; |
|
3436 |
$dhcp6cconf .= "script \"{$g['varetc_path']}/dhcp6c_{$interface}_script.sh\"; # we'd like some nameservers please\n"; |
|
3436 |
|
|
3437 |
$dhcp6cconf .= "\trequest domain-name-servers;\n"; |
|
3438 |
$dhcp6cconf .= "\trequest domain-name;\n"; |
|
3439 |
$dhcp6cconf .= "\tscript \"{$g['varetc_path']}/dhcp6c_{$interface}_script.sh\"; # we'd like some nameservers please\n"; |
|
3437 | 3440 |
|
3438 | 3441 |
$dhcp6cconf .= "};\n"; |
3439 |
$dhcp6cconf .= "id-assoc na 0 { };\n"; |
|
3442 |
|
|
3443 |
if(!isset($wancfg['dhcp6prefixonly'])) |
|
3444 |
$dhcp6cconf .= "id-assoc na 0 { };\n"; |
|
3445 |
|
|
3440 | 3446 |
if(is_numeric($wancfg['dhcp6-ia-pd-len'])) { |
3441 | 3447 |
/* Setup the prefix delegation */ |
3442 | 3448 |
$dhcp6cconf .= "id-assoc pd 0 {\n"; |
usr/local/www/interfaces.php | ||
---|---|---|
219 | 219 |
$wancfg['dhcp6-ia-pd-len'] = "none"; |
220 | 220 |
$pconfig['dhcp6-ia-pd-len'] = $wancfg['dhcp6-ia-pd-len']; |
221 | 221 |
$pconfig['type6'] = "dhcp6"; |
222 |
$pconfig['dhcp6prefixonly'] = isset($wancfg['dhcp6prefixonly']); |
|
222 | 223 |
break; |
223 | 224 |
case "6to4": |
224 | 225 |
$pconfig['type6'] = "6to4"; |
... | ... | |
746 | 747 |
unset($wancfg['dhcprejectfrom']); |
747 | 748 |
unset($wancfg['dhcp6-duid']); |
748 | 749 |
unset($wancfg['dhcp6-ia-pd-len']); |
750 |
unset($wancfg['dhcp6prefixonly']); |
|
749 | 751 |
unset($wancfg['track6-interface']); |
750 | 752 |
unset($wancfg['track6-prefix-id']); |
751 | 753 |
unset($wancfg['prefix-6rd']); |
... | ... | |
874 | 876 |
if ($_POST['gatewayv6'] != "none") { |
875 | 877 |
$wancfg['gatewayv6'] = $_POST['gatewayv6']; |
876 | 878 |
} |
879 |
if($_POST['dhcp6prefixonly'] == "yes") |
|
880 |
$wancfg['dhcp6prefixonly'] = true; |
|
877 | 881 |
break; |
878 | 882 |
case "slaac": |
879 | 883 |
$wancfg['ipaddrv6'] = "slaac"; |
... | ... | |
1796 | 1800 |
</td> |
1797 | 1801 |
</tr> |
1798 | 1802 |
--> |
1803 |
<tr> |
|
1804 |
<td width="22%" valign="top" class="vncell"><?=gettext("Request only a IPv6 prefix"); ?></td> |
|
1805 |
<td width="78%" class="vtable"> |
|
1806 |
<input name="dhcp6prefixonly" type="checkbox" value="yes" <?php if ($pconfig['dhcp6prefixonly'] == true) echo "checked=\"checked\""; ?>" /> |
|
1807 |
<?=gettext("Only request a IPv6 prefix, do not request a IPv6 address"); ?> |
|
1808 |
</td> |
|
1809 |
</tr> |
|
1799 | 1810 |
<tr> |
1800 | 1811 |
<td width="22%" valign="top" class="vncell"><?=gettext("DHCPv6 Prefix Delegation size"); ?></td> |
1801 | 1812 |
<td width="78%" class="vtable"> |
Also available in: Unified diff
Add a checkbox that can be used to request only a IPv6 prefix without a IPv6 address. Some ISPs DHCP6 servers will fail the request if both are requested and only a Prefix is allowed.