summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/filter.inc6
-rw-r--r--etc/inc/pfsense-utils.inc4
2 files changed, 8 insertions, 2 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index fe9ba79..4187379 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -189,11 +189,13 @@ function filter_configure_sync() {
if ($config['system']['maximumstates'] <> "" && is_numeric($config['system']['maximumstates'])) {
/* User defined maximum states in Advanced menu. */
$rules .= "set limit states {$config['system']['maximumstates']}\n";
- mwexec("/usr/sbin/sysctl net.inet.flowtable.nmbflows={$config['system']['maximumstates']}");
+ if(get_freebsd_version() == "8")
+ mwexec("/usr/sbin/sysctl net.inet.flowtable.nmbflows={$config['system']['maximumstates']}");
} else {
$max_states = pfsense_default_state_size();
$rules .= "set limit states {$max_states}\n";
- mwexec("/usr/sbin/sysctl net.inet.flowtable.nmbflows={$max_states}");
+ if(get_freebsd_version() == "8")
+ mwexec("/usr/sbin/sysctl net.inet.flowtable.nmbflows={$max_states}");
}
$rules .= "\n";
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index e94fa10..45086bd 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -1704,4 +1704,8 @@ function register_via_growl() {
}
}
+function get_freebsd_version() {
+ $version = `/usr/bin/uname -r | cut -d'.' -f1`
+}
+
?> \ No newline at end of file
OpenPOWER on IntegriCloud