diff options
author | Steve Beaver <sbeaver@netgate.com> | 2017-05-16 13:49:08 -0400 |
---|---|---|
committer | Steve Beaver <sbeaver@netgate.com> | 2017-05-16 13:49:08 -0400 |
commit | b880cf8c5376a44bea37d09792dc4b6f4e679648 (patch) | |
tree | 841c877cd15c7196584495cf9b3e76bb3c84a2cf /src/usr/local/www | |
parent | b036b5e51e8fbc914b99bd609fc6785743364371 (diff) | |
parent | 46fff8a576813fa1dfa9a5289f8ca9e05583af3c (diff) | |
download | pfsense-b880cf8c5376a44bea37d09792dc4b6f4e679648.zip pfsense-b880cf8c5376a44bea37d09792dc4b6f4e679648.tar.gz |
t revert 47d4784602466d723a84bb1af6d313c4ba5a0115qMerge branch 'master' of gitlab.netgate.com:pfsense/pfsense
Diffstat (limited to 'src/usr/local/www')
-rw-r--r-- | src/usr/local/www/includes/functions.inc.php | 34 | ||||
-rw-r--r-- | src/usr/local/www/services_unbound_advanced.php | 17 | ||||
-rw-r--r-- | src/usr/local/www/widgets/widgets/system_information.widget.php | 3 |
3 files changed, 53 insertions, 1 deletions
diff --git a/src/usr/local/www/includes/functions.inc.php b/src/usr/local/www/includes/functions.inc.php index 91b0a13..5e3c442 100644 --- a/src/usr/local/www/includes/functions.inc.php +++ b/src/usr/local/www/includes/functions.inc.php @@ -239,12 +239,44 @@ function get_cpufreq() { return $out; } +function get_cpu_crypto_support() { + $machine = get_single_sysctl('hw.machine'); + $accelerated_arm_platforms = array('am335x'); + $cpucrypto_type = ""; + + switch ($machine) { + case 'amd64': + $cpucrypto_type = "AES-NI CPU Crypto: "; + exec("/usr/bin/grep -c ' Features.*AESNI' /var/log/dmesg.boot", $cpucrypto_present); + if ($cpucrypto_present[0] > 0) { + $cpucrypto_type .= "Yes "; + $cpucrypto_type .= (is_module_loaded('aesni')) ? "(active)" : "(inactive)"; + } else { + $cpucrypto_type .= "No"; + } + case 'arm': + $armplatform = get_single_sysctl('hw.platform'); + if (in_array($armplatform, $accelerated_arm_platforms)) { + /* No drivers yet, so mark inactive! */ + $cpucrypto_type = "{$armplatform} built-in CPU Crypto (inactive)"; + } + default: + /* Unknown/unidentified platform */ + } + + if (!empty($cpucrypto_type)) { + return $cpucrypto_type; + } else { + return "CPU Crypto: None/Unknown Platform"; + } +} + function get_cpu_count($show_detail = false) { $cpucount = get_single_sysctl('kern.smp.cpus'); if ($show_detail) { $cpudetail = ""; - exec("/usr/bin/grep 'SMP.*package.*core' /var/log/dmesg.boot | /usr/bin/cut -f2- -d' '", $cpudetail); + exec("/usr/bin/grep 'FreeBSD/SMP:.*package' /var/log/dmesg.boot | /usr/bin/cut -f2- -d' '", $cpudetail); $cpucount = $cpudetail[0]; } return $cpucount; diff --git a/src/usr/local/www/services_unbound_advanced.php b/src/usr/local/www/services_unbound_advanced.php index c50d043..2d1a0dc 100644 --- a/src/usr/local/www/services_unbound_advanced.php +++ b/src/usr/local/www/services_unbound_advanced.php @@ -71,6 +71,10 @@ if (isset($config['unbound']['disable_auto_added_access_control'])) { $pconfig['disable_auto_added_access_control'] = true; } +if (isset($config['unbound']['disable_auto_added_host_entries'])) { + $pconfig['disable_auto_added_host_entries'] = true; +} + if (isset($config['unbound']['use_caps'])) { $pconfig['use_caps'] = true; } @@ -171,6 +175,12 @@ if ($_POST) { unset($config['unbound']['disable_auto_added_access_control']); } + if (isset($_POST['disable_auto_added_host_entries'])) { + $config['unbound']['disable_auto_added_host_entries'] = true; + } else { + unset($config['unbound']['disable_auto_added_host_entries']); + } + if (isset($_POST['use_caps'])) { $config['unbound']['use_caps'] = true; } else { @@ -350,6 +360,13 @@ $section->addInput(new Form_Checkbox( 'Allowed networks must be manually configured on the Access Lists tab if the auto-added entries are disabled.'); $section->addInput(new Form_Checkbox( + 'disable_auto_added_host_entries', + 'Disable Auto-added Host Entries', + 'Disable the automatically-added host entries', + $pconfig['disable_auto_added_host_entries'] +))->setHelp('By default, the primary IPv4 and IPv6 addresses of this firewall are added as records for the system domain of this firewall as configured in %1$sSystem: General Setup%2$s. This disables the auto generation of these entries.', '<a href="system.php">', '</a>'); + +$section->addInput(new Form_Checkbox( 'use_caps', 'Experimental Bit 0x20 Support', 'Use 0x-20 encoded random bits in the DNS query to foil spoofing attempts.', diff --git a/src/usr/local/www/widgets/widgets/system_information.widget.php b/src/usr/local/www/widgets/widgets/system_information.widget.php index 1fbdd58..838ee72 100644 --- a/src/usr/local/www/widgets/widgets/system_information.widget.php +++ b/src/usr/local/www/widgets/widgets/system_information.widget.php @@ -232,6 +232,9 @@ $rows_displayed = false; <?= htmlspecialchars($cpucount) ?> <?=gettext('CPUs')?>: <?= htmlspecialchars(get_cpu_count(true)); ?> </div> <?php endif; ?> + <div id="cpucrypto"> + <?= get_cpu_crypto_support(); ?> + </div> </td> </tr> <?php |