summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www
diff options
context:
space:
mode:
authorschinken <schinken@bamberg.ccc.de>2016-01-09 13:37:17 +0100
committerschinken <schinken@hackerspace-bamberg.de>2016-01-28 12:45:44 +0100
commit352defe4356b9ee6ac0042b4c34957006e0a9f77 (patch)
tree5fe2640d45db522e7cf163ae64866ccb57cf9d0a /src/usr/local/www
parent8224a71ed8eb6b98eb790673b95703311f4586c8 (diff)
downloadpfsense-352defe4356b9ee6ac0042b4c34957006e0a9f77.zip
pfsense-352defe4356b9ee6ac0042b4c34957006e0a9f77.tar.gz
Add possibility to configure radvd valid lifetime
Diffstat (limited to 'src/usr/local/www')
-rw-r--r--src/usr/local/www/services_router_advertisements.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/usr/local/www/services_router_advertisements.php b/src/usr/local/www/services_router_advertisements.php
index 1693b4a..bcc896b 100644
--- a/src/usr/local/www/services_router_advertisements.php
+++ b/src/usr/local/www/services_router_advertisements.php
@@ -118,6 +118,10 @@ if (is_array($config['dhcpdv6'][$if])) {
if ($pconfig['rapriority'] == "") {
$pconfig['rapriority'] = "medium";
}
+
+ $pconfig['ravalidlifetime'] = $config['dhcpdv6'][$if]['ravalidlifetime'];
+ $pconfig['rapreferredlifetime'] = $config['dhcpdv6'][$if]['rapreferredlifetime'];
+
$pconfig['rainterface'] = $config['dhcpdv6'][$if]['rainterface'];
$pconfig['radomainsearchlist'] = $config['dhcpdv6'][$if]['radomainsearchlist'];
list($pconfig['radns1'], $pconfig['radns2'], $pconfig['radns3']) = $config['dhcpdv6'][$if]['radnsserver'];
@@ -188,6 +192,10 @@ if ($_POST) {
}
}
+ if ($_POST['ravalidlifetime'] && (!is_numeric($_POST['ravalidlifetime']) || ($_POST['ravalidlifetime'] < 7200))) {
+ $input_errors[] = gettext("A valid lifetime below 2 hrs will be ignored by clients (RFC 4862 Section 5.5.3 point e)");
+ }
+
if (!$input_errors) {
if (!is_array($config['dhcpdv6'][$if])) {
$config['dhcpdv6'][$if] = array();
@@ -197,6 +205,9 @@ if ($_POST) {
$config['dhcpdv6'][$if]['rapriority'] = $_POST['rapriority'];
$config['dhcpdv6'][$if]['rainterface'] = $_POST['rainterface'];
+ $config['dhcpdv6'][$if]['ravalidlifetime'] = $_POST['ravalidlifetime'];
+ $config['dhcpdv6'][$if]['rapreferredlifetime'] = $_POST['rapreferredlifetime'];
+
$config['dhcpdv6'][$if]['radomainsearchlist'] = $_POST['radomainsearchlist'];
unset($config['dhcpdv6'][$if]['radnsserver']);
if ($_POST['radns1']) {
@@ -295,6 +306,22 @@ $section->addInput(new Form_Select(
$priority_modes
))->setHelp('Select the Priority for the Router Advertisement (RA) Daemon.');
+$section->addInput(new Form_Input(
+ 'ravalidlifetime',
+ 'Default valid lifetime',
+ 'text',
+ $pconfig['ravalidlifetime']
+))->setHelp('Seconds. The length of time in seconds (relative to the time the packet is sent) that the prefix is valid for the purpose of on-link determination.' . ' <br />' .
+'The default is 86400 seconds.');
+
+$section->addInput(new Form_Input(
+ 'rapreferredlifetime',
+ 'Default preferred lifetime',
+ 'text',
+ $pconfig['rapreferredlifetime']
+))->setHelp('Seconds. The length of time in seconds (relative to the time the packet is sent) that addresses generated from the prefix via stateless address autoconfiguration remain preferred.' . ' <br />' .
+ 'The default is 14400 seconds.');
+
$carplistif = array();
if (count($carplist) > 0) {
foreach ($carplist as $ifname => $vip) {
OpenPOWER on IntegriCloud