diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2007-03-27 21:42:45 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2007-03-27 21:42:45 +0000 |
commit | c5cb3ac22c42c24ae1c58459caaff88215a8c27c (patch) | |
tree | ebd1ba86e1dc757b4a4cb1c2ef1ca069ccc7de36 | |
parent | 1c3da6b3ac14cf500679e7f48b8e7ddb65a82b09 (diff) | |
download | pfsense-c5cb3ac22c42c24ae1c58459caaff88215a8c27c.zip pfsense-c5cb3ac22c42c24ae1c58459caaff88215a8c27c.tar.gz |
Teach the captive portal about time based rules so that it will not unload ipfw from underneath ourselves.
-rw-r--r-- | etc/inc/captiveportal.inc | 9 |
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"); |