summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2007-03-27 21:42:45 +0000
committerScott Ullrich <sullrich@pfsense.org>2007-03-27 21:42:45 +0000
commitc5cb3ac22c42c24ae1c58459caaff88215a8c27c (patch)
treeebd1ba86e1dc757b4a4cb1c2ef1ca069ccc7de36 /etc
parent1c3da6b3ac14cf500679e7f48b8e7ddb65a82b09 (diff)
downloadpfsense-c5cb3ac22c42c24ae1c58459caaff88215a8c27c.zip
pfsense-c5cb3ac22c42c24ae1c58459caaff88215a8c27c.tar.gz
Teach the captive portal about time based rules so that it will not unload ipfw from underneath ourselves.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/captiveportal.inc9
1 files changed, 8 insertions, 1 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc
index 2643498..c25b7d8 100644
--- a/etc/inc/captiveportal.inc
+++ b/etc/inc/captiveportal.inc
@@ -268,7 +268,14 @@ EOD;
if (!isset($config['shaper']['enable'])) {
/* unload ipfw */
- mwexec("/sbin/kldunload ipfw");
+ $installed_time_based_rules = false;
+ if($config['schedules']) {
+ foreach($config['schedules']['schedule'] as $sched) {
+ $installed_time_based_rules = true;
+ }
+ }
+ if($installed_time_based_rules == false)
+ mwexec("/sbin/kldunload ipfw");
} else {
/* shaper is on - just remove our rules */
mwexec("/sbin/ipfw -f delete set 1");
OpenPOWER on IntegriCloud