diff options
author | Renato Botelho <renato@netgate.com> | 2017-01-09 11:54:43 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2017-01-09 11:54:43 -0200 |
commit | 376c71bc6b2bdb72de7647e377771f8bdc8decf8 (patch) | |
tree | 93fc69bb5dfac09da49972a0538dbe41cce2c85a /src/usr/local/www/system_advanced_network.php | |
parent | cfa4a410cdd4b1edccb0cf5e3ccc148864b24762 (diff) | |
parent | fd2e503a7976e5528376231fccd043fbc8e46786 (diff) | |
download | pfsense-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.php | 15 |
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']); } |