diff options
author | Renato Botelho <garga@FreeBSD.org> | 2013-09-09 14:22:13 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2013-09-12 08:44:51 -0300 |
commit | 3b2769be3869c42f2e20413b358f11926de65ca9 (patch) | |
tree | b712307cf710149e90f918ee8fe4fdd6ab1b1d45 | |
parent | a7c00d8dba79bb76feeecc7deee35a757653ca61 (diff) | |
download | pfsense-3b2769be3869c42f2e20413b358f11926de65ca9.zip pfsense-3b2769be3869c42f2e20413b358f11926de65ca9.tar.gz |
Make sure db doesn't exist when start to configure macs
-rw-r--r-- | etc/inc/captiveportal.inc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc index d143f4d..138d041 100644 --- a/etc/inc/captiveportal.inc +++ b/etc/inc/captiveportal.inc @@ -999,6 +999,7 @@ function captiveportal_passthrumac_configure($lock = false) { $rules = ""; + captiveportal_zap_blockedmacs_db(); if (is_array($config['captiveportal'][$cpzone]['passthrumac'])) foreach ($config['captiveportal'][$cpzone]['passthrumac'] as $macent) $rules .= captiveportal_passthrumac_configure_entry($macent); @@ -2120,6 +2121,12 @@ function captiveportal_write_blockedmacs_db($blockedmacs) { unlock($cpumaclck); } +function captiveportal_zap_blockedmacs_db() { + global $g, $cpzone; + + @unlink_if_exists("{$g['vardb_path']}/captiveportal_blockedmacs_{$cpzone}.db"); +} + function captiveportal_send_server_accounting($off = false) { global $cpzone, $config; |