summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2012-06-12 15:10:24 -0400
committerjim-p <jimp@pfsense.org>2012-06-12 15:10:24 -0400
commit7530177c7c59795b4e5c0767453444837ee5d622 (patch)
treee7222691d5e000fdb96508d943480900d33cfade /etc
parent7c9a30c8e20bc4f83395d1497c12f5c1c5298178 (diff)
downloadpfsense-7530177c7c59795b4e5c0767453444837ee5d622.zip
pfsense-7530177c7c59795b4e5c0767453444837ee5d622.tar.gz
Generalize the Crypto hardware option and add GUI support for AES-NI.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/globals.inc2
-rw-r--r--etc/inc/pfsense-utils.inc16
-rw-r--r--etc/inc/upgrade_config.inc8
-rwxr-xr-xetc/rc.bootup4
4 files changed, 21 insertions, 9 deletions
diff --git a/etc/inc/globals.inc b/etc/inc/globals.inc
index 711d1f5..519f28c 100644
--- a/etc/inc/globals.inc
+++ b/etc/inc/globals.inc
@@ -77,7 +77,7 @@ $g = array(
"disablecrashreporter" => false,
"crashreporterurl" => "http://crashreporter.pfsense.org/crash_reporter.php",
"debug" => false,
- "latest_config" => "8.7",
+ "latest_config" => "8.8",
"nopkg_platforms" => array("cdrom"),
"minimum_ram_warning" => "101",
"minimum_ram_warning_text" => "128 MB",
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 9402eb7..ef2a4f8 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -1498,13 +1498,19 @@ function compare_hostname_to_dnscache($hostname) {
}
/*
- * load_glxsb() - Load the glxsb crypto module if enabled in config.
+ * load_crypto() - Load crypto modules if enabled in config.
*/
-function load_glxsb() {
+function load_crypto() {
global $config, $g;
- $is_loaded = `/sbin/kldstat | /usr/bin/grep -c glxsb`;
- if (isset($config['system']['glxsb_enable']) && ($is_loaded == 0)) {
- mwexec("/sbin/kldload glxsb");
+ $crypto_modules = array('glxsb', 'aesni');
+
+ if (!in_array($config['system']['crypto_hardware'], $crypto_modules))
+ return false;
+
+ $is_loaded = `/sbin/kldstat | /usr/bin/grep -c {$config['system']['crypto_hardware']}`;
+ if (!empty($config['system']['crypto_hardware']) && ($is_loaded == 0)) {
+ log_error("Loading {$config['system']['crypto_hardware']} cryptographic accelerator module.");
+ mwexec("/sbin/kldload {$config['system']['crypto_hardware']}");
}
}
diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc
index 04b6a71..b8bb978 100644
--- a/etc/inc/upgrade_config.inc
+++ b/etc/inc/upgrade_config.inc
@@ -2876,5 +2876,11 @@ function upgrade_086_to_087() {
}
}
}
-
+function upgrade_087_to_088() {
+ global $config;
+ if (isset($config['system']['glxsb_enable'])) {
+ unset($config['system']['glxsb_enable']);
+ $config['system']['crypto_hardware'] = "glxsb";
+ }
+}
?>
diff --git a/etc/rc.bootup b/etc/rc.bootup
index 8b78866..a4479ab 100755
--- a/etc/rc.bootup
+++ b/etc/rc.bootup
@@ -215,8 +215,8 @@ echo "Setting up extended sysctls...";
system_setup_sysctl();
echo "done.\n";
-/* enable glxsb if wanted */
-load_glxsb();
+/* enable optional crypto modules */
+load_crypto();
/* run any early shell commands specified in config.xml */
system_do_shell_commands(1);
OpenPOWER on IntegriCloud