summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorDaniel Becker <razzfazz@gmail.com>2013-09-02 17:34:30 -0700
committerDaniel Becker <razzfazz@gmail.com>2013-09-03 02:05:52 -0700
commit18f3c2fd09e313a1593f71c95627636aac669825 (patch)
tree6a12326b06e3fb72d483ca5dc06d915a1d4ab201 /etc
parent324e112d0634226a34f377eb21f279e028d6c266 (diff)
downloadpfsense-18f3c2fd09e313a1593f71c95627636aac669825.zip
pfsense-18f3c2fd09e313a1593f71c95627636aac669825.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.inc5
1 files changed, 4 insertions, 1 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 5694ebc..7780cc3 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";
}
}
OpenPOWER on IntegriCloud