summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal LUÇI <eri@pfsense.org>2015-01-12 19:25:24 +0100
committerErmal LUÇI <eri@pfsense.org>2015-01-12 19:25:24 +0100
commitf084049d71118d6c12b954fc55206e719c0bb33c (patch)
treeee3710f5735f07ed298d8568be45b984830458d1
parent8ec853c3d500465d081aefcd61b6b28ce780a198 (diff)
downloadpfsense-f084049d71118d6c12b954fc55206e719c0bb33c.zip
pfsense-f084049d71118d6c12b954fc55206e719c0bb33c.tar.gz
Do not leak firewall rules as well when (re)creating rules
-rw-r--r--etc/inc/captiveportal.inc3
1 files changed, 3 insertions, 0 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc
index 94c4dd8..a0da275 100644
--- a/etc/inc/captiveportal.inc
+++ b/etc/inc/captiveportal.inc
@@ -484,7 +484,10 @@ function captiveportal_init_rules($reinit = false) {
captiveportal_load_modules();
mwexec("/sbin/ipfw zone {$cpzoneid} create", true);
+
+ /* Cleanup so nothing is leaked */
captiveportal_free_dnrules();
+ unlink_if_exists("{$g['vardb_path']}/captiveportal_{$cpzone}.rules");
$cpips = array();
$ifaces = get_configured_interface_list();
OpenPOWER on IntegriCloud