summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authormarjohn56 <martin@queens-park.com>2017-07-27 19:59:11 +0100
committerRenato Botelho <renato@netgate.com>2017-07-31 16:32:28 -0300
commitccf8bd86b8c0363e253d369afa3bfb4b375c36dd (patch)
treed58fe947a1d01e7c7451638c7717d8037e6b8d56 /src/usr
parent1528ee4e95920c7e80f378cbb0e4bb4f44463691 (diff)
downloadpfsense-ccf8bd86b8c0363e253d369afa3bfb4b375c36dd.zip
pfsense-ccf8bd86b8c0363e253d369afa3bfb4b375c36dd.tar.gz
dhcp6c Advanced Config prefix interface
Currently, when using dhcp6c advanced configuration the prefix interface is WAN, this is not very useful! The changes here allow the user to select the interface that the PD will be applied on.. (cherry picked from commit 58a185aede55efe71cabc337938ed05f456eecea)
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/local/www/interfaces.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/usr/local/www/interfaces.php b/src/usr/local/www/interfaces.php
index 681c44d..2ad5688 100644
--- a/src/usr/local/www/interfaces.php
+++ b/src/usr/local/www/interfaces.php
@@ -121,6 +121,7 @@ if (!is_array($config['gateways']['gateway_item'])) {
$a_gateways = &$config['gateways']['gateway_item'];
+$interfaces = get_configured_interface_with_descr();
$wancfg = &$config['interfaces'][$if];
$old_wancfg = $wancfg;
$old_wancfg['realif'] = get_real_interface($if);
@@ -259,6 +260,7 @@ $pconfig['adv_dhcp6_id_assoc_statement_prefix_vltime'] = $wancfg['adv_dhcp6_id_a
$pconfig['adv_dhcp6_prefix_interface_statement_sla_id'] = $wancfg['adv_dhcp6_prefix_interface_statement_sla_id'];
$pconfig['adv_dhcp6_prefix_interface_statement_sla_len'] = $wancfg['adv_dhcp6_prefix_interface_statement_sla_len'];
+$pconfig['adv_dhcp6_prefix_selected_interface'] = $wancfg['adv_dhcp6_prefix_selected_interface'];
$pconfig['adv_dhcp6_authentication_statement_authname'] = $wancfg['adv_dhcp6_authentication_statement_authname'];
$pconfig['adv_dhcp6_authentication_statement_protocol'] = $wancfg['adv_dhcp6_authentication_statement_protocol'];
@@ -1085,6 +1087,7 @@ if ($_POST['apply']) {
unset($wancfg['adv_dhcp6_prefix_interface_statement_sla_id']);
unset($wancfg['adv_dhcp6_prefix_interface_statement_sla_len']);
+ unset($wancfg['adv_dhcp6_prefix_selected_interface']);
unset($wancfg['adv_dhcp6_authentication_statement_authname']);
unset($wancfg['adv_dhcp6_authentication_statement_protocol']);
@@ -1348,7 +1351,9 @@ if ($_POST['apply']) {
if (is_numericint($_POST['adv_dhcp6_prefix_interface_statement_sla_len'])) {
$wancfg['adv_dhcp6_prefix_interface_statement_sla_len'] = $_POST['adv_dhcp6_prefix_interface_statement_sla_len'];
}
-
+ if (!empty($_POST['adv_dhcp6_prefix_selected_interface'])) {
+ $wancfg['adv_dhcp6_prefix_selected_interface'] = $_POST['adv_dhcp6_prefix_selected_interface'];
+ }
if (!empty($_POST['adv_dhcp6_authentication_statement_authname'])) {
$wancfg['adv_dhcp6_authentication_statement_authname'] = $_POST['adv_dhcp6_authentication_statement_authname'];
}
@@ -2361,6 +2366,14 @@ $group->add(new Form_Input(
$section->add($group);
+$group = new Form_Group('Select prefix interface');
+$section->addInput(new Form_Select(
+ 'adv_dhcp6_prefix_selected_interface',
+ 'Prefix Interface',
+ $pconfig['adv_dhcp6_prefix_selected_interface'],
+ $interfaces
+))->setHelp('Select the interface on which to apply the prefix delegation.');
+
$group = new Form_Group('Authentication statement');
$group->add(new Form_Input(
OpenPOWER on IntegriCloud