summaryrefslogtreecommitdiffstats
path: root/etc/inc/captiveportal.inc
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2009-04-06 13:26:29 -0400
committerChris Buechler <cmb@pfsense.org>2009-04-06 13:26:29 -0400
commit0529f24a637045da169c56ef09c85227aa984a94 (patch)
tree2eb0a6b6b94f4c64284297f4761625e950ee301d /etc/inc/captiveportal.inc
parent9ffede93c738f5e3a6d0e10a6c3f61e8844a131b (diff)
downloadpfsense-0529f24a637045da169c56ef09c85227aa984a94.zip
pfsense-0529f24a637045da169c56ef09c85227aa984a94.tar.gz
Set ipfw's state limit the same as pf's
Diffstat (limited to 'etc/inc/captiveportal.inc')
-rw-r--r--etc/inc/captiveportal.inc11
1 files changed, 10 insertions, 1 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc
index 8e13850..462cbb55 100644
--- a/etc/inc/captiveportal.inc
+++ b/etc/inc/captiveportal.inc
@@ -65,6 +65,15 @@ function captiveportal_configure() {
/* make sure ipfw is loaded */
mwexec("/sbin/kldload ipfw");
+
+ /* Set ipfw state limit */
+ if ($config['system']['maximumstates'] <> "" && is_numeric($config['system']['maximumstates'])) {
+ /* Set ipfw states to user defined maximum states in Advanced menu. */
+ mwexec("sysctl net.inet.ip.fw.dyn_max={$config['system']['maximumstates']}");
+ } else {
+ /* Set to default 10,000 */
+ mwexec("sysctl net.inet.ip.fw.dyn_max=10000");
+ }
mwexec("/sbin/sysctl net.inet.ip.pfil.inbound=\"ipfw,pf\"");
mwexec("/sbin/sysctl net.inet.ip.pfil.outbound=\"ipfw,pf\"");
@@ -1125,4 +1134,4 @@ function portal_mac_fixed($clientmac) {
return FALSE ;
}
-?>
+?> \ No newline at end of file
OpenPOWER on IntegriCloud