summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2016-07-09 19:06:33 -0500
committerChris Buechler <cmb@pfsense.org>2016-07-09 19:07:14 -0500
commitd12fc6cd0b39de202f325562281ea1c1c9c7d518 (patch)
tree17411e763e2deba3db69ce7867d4a9938565927e
parent48eb136f0a18e4f2ae006af4f8ea2f16334af583 (diff)
downloadpfsense-d12fc6cd0b39de202f325562281ea1c1c9c7d518.zip
pfsense-d12fc6cd0b39de202f325562281ea1c1c9c7d518.tar.gz
Add config option for AdvDefaultLifetime, clean up descriptions on other. Ticket #6533
-rw-r--r--src/etc/inc/services.inc3
-rw-r--r--src/usr/local/www/services_router_advertisements.php16
2 files changed, 17 insertions, 2 deletions
diff --git a/src/etc/inc/services.inc b/src/etc/inc/services.inc
index a970e37..c21f3eb 100644
--- a/src/etc/inc/services.inc
+++ b/src/etc/inc/services.inc
@@ -155,6 +155,9 @@ function services_radvd_configure($blacklist = array()) {
} else {
$radvdconf .= "\tMaxRtrAdvInterval 20;\n";
}
+ if (is_numericint($dhcpv6ifconf['raadvdefaultlifetime'])) {
+ $radvdconf .= "\tAdvDefaultLifetime {$dhcpv6ifconf['raadvdefaultlifetime']};\n";
+ }
$mtu = get_interface_mtu($realif);
if (is_numeric($mtu)) {
diff --git a/src/usr/local/www/services_router_advertisements.php b/src/usr/local/www/services_router_advertisements.php
index 3ec5d72..3e73fba 100644
--- a/src/usr/local/www/services_router_advertisements.php
+++ b/src/usr/local/www/services_router_advertisements.php
@@ -129,6 +129,7 @@ if (is_array($config['dhcpdv6'][$if])) {
$pconfig['rapreferredlifetime'] = $config['dhcpdv6'][$if]['rapreferredlifetime'];
$pconfig['raminrtradvinterval'] = $config['dhcpdv6'][$if]['raminrtradvinterval'];
$pconfig['ramaxrtradvinterval'] = $config['dhcpdv6'][$if]['ramaxrtradvinterval'];
+ $pconfig['raadvdefaultlifetime'] = $config['dhcpdv6'][$if]['raadvdefaultlifetime'];
$pconfig['radomainsearchlist'] = $config['dhcpdv6'][$if]['radomainsearchlist'];
list($pconfig['radns1'], $pconfig['radns2'], $pconfig['radns3']) = $config['dhcpdv6'][$if]['radnsserver'];
@@ -226,6 +227,9 @@ if ($_POST) {
$input_errors[] = gettext("Maximum advertisement interval must be no less than 4 and no greater than 1800.");
}
}
+ if ($_POST['raadvdefaultlifetime'] && !is_numericint($_POST['raadvdefaultlifetime'])) {
+ $input_errors[] = gettext("Router lifetime must be an integer between 1 and 9000.");
+ }
if (!$input_errors) {
if (!is_array($config['dhcpdv6'][$if])) {
@@ -240,6 +244,7 @@ if ($_POST) {
$config['dhcpdv6'][$if]['rapreferredlifetime'] = $_POST['rapreferredlifetime'];
$config['dhcpdv6'][$if]['raminrtradvinterval'] = $_POST['raminrtradvinterval'];
$config['dhcpdv6'][$if]['ramaxrtradvinterval'] = $_POST['ramaxrtradvinterval'];
+ $config['dhcpdv6'][$if]['raadvdefaultlifetime'] = $_POST['raadvdefaultlifetime'];
$config['dhcpdv6'][$if]['radomainsearchlist'] = $_POST['radomainsearchlist'];
unset($config['dhcpdv6'][$if]['radnsserver']);
@@ -391,7 +396,7 @@ $section->addInput(new Form_Input(
'number',
$pconfig['raminrtradvinterval'],
['min' => 3, 'max' => 1350]
-))->setHelp('Length in seconds');
+))->setHelp('The minimum time allowed between sending unsolicited multicast router advertisements in seconds.');
$section->addInput(new Form_Input(
'ramaxrtradvinterval',
@@ -399,8 +404,15 @@ $section->addInput(new Form_Input(
'number',
$pconfig['ramaxrtradvinterval'],
['min' => 4, 'max' => 1800]
-))->setHelp('The length of time in seconds');
+))->setHelp('The maximum time allowed between sending unsolicted multicast router advertisements in seconds.');
+$section->addInput(new Form_Input(
+ 'raadvdefaultlifetime',
+ 'Router lifetime',
+ 'number',
+ $pconfig['raadvdefaultlifetime'],
+ ['min' => 1, 'max' => 9000]
+))->setHelp('The lifetime associated with the default router in seconds.');
$section->addInput(new Form_StaticText(
'RA Subnets',
OpenPOWER on IntegriCloud