summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-01-02 17:14:38 +0000
committerErmal <eri@pfsense.org>2013-01-02 17:14:38 +0000
commit192d89317ada20069326ccc73fdf1a2da521a0e7 (patch)
tree91e019b3b44525c0b871dc520951d34be42cae7d
parent6f0d237e757ab25a8d333af4caf42a7d77239e5b (diff)
downloadpfsense-192d89317ada20069326ccc73fdf1a2da521a0e7.zip
pfsense-192d89317ada20069326ccc73fdf1a2da521a0e7.tar.gz
Enable mod_evasive if needed for CP
-rw-r--r--etc/inc/system.inc5
1 files changed, 3 insertions, 2 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc
index daca4df..cb45709 100644
--- a/etc/inc/system.inc
+++ b/etc/inc/system.inc
@@ -740,9 +740,10 @@ function system_generate_lighty_config($filename,
$captiveportal = ",\"mod_rewrite\"";
$captive_portal_rewrite = "url.rewrite-once = ( \"(.*captiveportal.*)\" => \"$1\", \"(.*)\" => \"/index.php?redirurl=$1\" )\n";
$maxprocperip = $config['captiveportal']['maxprocperip'];
- if($maxprocperip and $maxprocperip > 0)
+ if ($maxprocperip and $maxprocperip > 0) {
$captive_portal_mod_evasive = "evasive.max-conns-per-ip = {$maxprocperip}";
- else
+ $captiveportal .= ",\"mod_evasive\"";
+ } else
$captive_portal_mod_evasive = "";
$server_upload_dirs = "server.upload-dirs = ( \"{$g['tmp_path']}/captiveportal/\" )\n";
exec("mkdir -p {$g['tmp_path']}/captiveportal");
OpenPOWER on IntegriCloud