summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorsmos <seth.mos@dds.nl>2013-07-02 10:18:31 +0200
committersmos <seth.mos@dds.nl>2013-07-02 10:21:07 +0200
commit6dcbd1b3ada8c5fdbcb2f10ac5b9791ad281b399 (patch)
treeae999630fe562da1811eb41d7283e999b4ba48bd /etc
parent5ce5439f411cec4e03b47bab82f71c65158a444e (diff)
downloadpfsense-6dcbd1b3ada8c5fdbcb2f10ac5b9791ad281b399.zip
pfsense-6dcbd1b3ada8c5fdbcb2f10ac5b9791ad281b399.tar.gz
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.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/interfaces.inc16
1 files changed, 11 insertions, 5 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 41d326e..eb28c0e 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -3427,16 +3427,22 @@ function interface_dhcpv6_configure($interface = "wan", $wancfg) {
$dhcp6cconf .= " script \"{$g['varetc_path']}/dhcp6c_{$interface}_script.sh\"; # we'd like some nameservers please\n";
$dhcp6cconf .= "};\n";
} else {
-
+ /* skip address request if this is set */
+ if(!isset($wancfg['dhcp6prefixonly']))
+ $dhcp6cconf .= " send ia-na 0; # request stateful address\n";
$dhcp6cconf .= " send ia-na 0; # request stateful address\n";
if(is_numeric($wancfg['dhcp6-ia-pd-len']))
$dhcp6cconf .= " send ia-pd 0; # request prefix delegation\n";
- $dhcp6cconf .= "request domain-name-servers;\n";
- $dhcp6cconf .= "request domain-name;\n";
- $dhcp6cconf .= "script \"{$g['varetc_path']}/dhcp6c_{$interface}_script.sh\"; # we'd like some nameservers please\n";
+
+ $dhcp6cconf .= "\trequest domain-name-servers;\n";
+ $dhcp6cconf .= "\trequest domain-name;\n";
+ $dhcp6cconf .= "\tscript \"{$g['varetc_path']}/dhcp6c_{$interface}_script.sh\"; # we'd like some nameservers please\n";
$dhcp6cconf .= "};\n";
- $dhcp6cconf .= "id-assoc na 0 { };\n";
+
+ if(!isset($wancfg['dhcp6prefixonly']))
+ $dhcp6cconf .= "id-assoc na 0 { };\n";
+
if(is_numeric($wancfg['dhcp6-ia-pd-len'])) {
/* Setup the prefix delegation */
$dhcp6cconf .= "id-assoc pd 0 {\n";
OpenPOWER on IntegriCloud