diff options
author | Daniel Becker <razzfazz@gmail.com> | 2013-09-02 17:34:30 -0700 |
---|---|---|
committer | Daniel Becker <razzfazz@gmail.com> | 2013-09-02 17:34:30 -0700 |
commit | 90652fbfe9e194ac83b1fc76d4b31c8c7309166e (patch) | |
tree | bb0ba48464aa81fb1fb7fdd6bd887bdb0498c615 /etc | |
parent | 7a6851dff7763fc85d03648ca30039fcd53ac620 (diff) | |
download | pfsense-90652fbfe9e194ac83b1fc76d4b31c8c7309166e.zip pfsense-90652fbfe9e194ac83b1fc76d4b31c8c7309166e.tar.gz |
add option to send prefix hint for requesting desired prefix length for delegation
This change adds an option on the interfaces page for sending a prefix hint for the selected delegation size. If enabled, a "prefix" field requesting :: with the appropriate prefix length (64 - dhcp6-ia-pd-len) is added to the "id-assoc pd" entry in the dhcp6c config file. This hint is required for requesting prefixes shorter than /64 from Comcast.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/interfaces.inc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index 85b7476..c42f8d4 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -3512,6 +3512,9 @@ function interface_dhcpv6_configure($interface = "wan", $wancfg) { if(is_numeric($wancfg['dhcp6-ia-pd-len'])) { /* Setup the prefix delegation */ $dhcp6cconf .= "id-assoc pd 0 {\n"; + $preflen = 64 - $wancfg['dhcp6-ia-pd-len']; + if (isset($wancfg['dhcp6-ia-pd-send-hint'])) + $dhcp6cconf .= " prefix ::/{$preflen} infinity;\n"; $iflist = link_interface_to_track6($interface); foreach ($iflist as $friendly => $ifcfg) { if (is_numeric($ifcfg['track6-prefix-id'])) { @@ -3524,7 +3527,7 @@ function interface_dhcpv6_configure($interface = "wan", $wancfg) { $dhcp6cconf .= " };\n"; } } - unset($iflist, $ifcfg); + unset($preflen, $iflist, $ifcfg); $dhcp6cconf .= "};\n"; } } |