diff options
author | smos <seth.mos@dds.nl> | 2013-07-02 10:18:31 +0200 |
---|---|---|
committer | smos <seth.mos@dds.nl> | 2013-07-02 10:21:07 +0200 |
commit | 6dcbd1b3ada8c5fdbcb2f10ac5b9791ad281b399 (patch) | |
tree | ae999630fe562da1811eb41d7283e999b4ba48bd /etc | |
parent | 5ce5439f411cec4e03b47bab82f71c65158a444e (diff) | |
download | pfsense-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.inc | 16 |
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"; |