summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/system_advanced_network.php
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2017-01-09 11:54:43 -0200
committerRenato Botelho <renato@netgate.com>2017-01-09 11:54:43 -0200
commit376c71bc6b2bdb72de7647e377771f8bdc8decf8 (patch)
tree93fc69bb5dfac09da49972a0538dbe41cce2c85a /src/usr/local/www/system_advanced_network.php
parentcfa4a410cdd4b1edccb0cf5e3ccc148864b24762 (diff)
parentfd2e503a7976e5528376231fccd043fbc8e46786 (diff)
downloadpfsense-376c71bc6b2bdb72de7647e377771f8bdc8decf8.zip
pfsense-376c71bc6b2bdb72de7647e377771f8bdc8decf8.tar.gz
Merge pull request #3365 from phil-davis/format_duid
Diffstat (limited to 'src/usr/local/www/system_advanced_network.php')
-rw-r--r--src/usr/local/www/system_advanced_network.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/usr/local/www/system_advanced_network.php b/src/usr/local/www/system_advanced_network.php
index 529d03b..1200996 100644
--- a/src/usr/local/www/system_advanced_network.php
+++ b/src/usr/local/www/system_advanced_network.php
@@ -56,6 +56,14 @@ if ($_POST) {
$input_errors[] = gettext("An IP address to NAT IPv6 packets must be specified.");
}
+ if (!empty($_POST['global-v6duid'])) {
+ $_POST['global-v6duid'] = format_duid($_POST['global-v6duid']);
+ $pconfig['global-v6duid'] = $_POST['global-v6duid'];
+ if (!is_duid($_POST['global-v6duid'])) {
+ $input_errors[] = gettext("A valid DUID must be specified");
+ }
+ }
+
ob_flush();
flush();
if (!$input_errors) {
@@ -85,12 +93,7 @@ if ($_POST) {
}
if (!empty($_POST['global-v6duid'])) {
- $_POST['global-v6duid'] = strtolower(str_replace("-", ":", $_POST['global-v6duid']));
- if (!is_duid($_POST['global-v6duid'])) {
- $input_errors[] = gettext("A valid DUID must be specified");
- } else {
- $config['system']['global-v6duid'] = $_POST['global-v6duid'];
- }
+ $config['system']['global-v6duid'] = $_POST['global-v6duid'];
} else {
unset($config['system']['global-v6duid']);
}
OpenPOWER on IntegriCloud