diff options
author | Ermal <eri@pfsense.org> | 2010-05-24 22:58:12 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-05-24 22:58:12 +0000 |
commit | d5c56d72260c089d4044c963eb471cd84359efa2 (patch) | |
tree | 702a2c4a7520fb4d40b8d2d8223848f283e21c98 /usr/local/www/services_captiveportal_mac_edit.php | |
parent | 0eb9b1b4a7f5c8455d5197fff121ddddfff4ad46 (diff) | |
download | pfsense-d5c56d72260c089d4044c963eb471cd84359efa2.zip pfsense-d5c56d72260c089d4044c963eb471cd84359efa2.tar.gz |
When editing a mac/ip passthru entry readd the rules again since values might have changed.
Diffstat (limited to 'usr/local/www/services_captiveportal_mac_edit.php')
-rwxr-xr-x | usr/local/www/services_captiveportal_mac_edit.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/usr/local/www/services_captiveportal_mac_edit.php b/usr/local/www/services_captiveportal_mac_edit.php index ac7b341..0d46ec4 100755 --- a/usr/local/www/services_captiveportal_mac_edit.php +++ b/usr/local/www/services_captiveportal_mac_edit.php @@ -120,6 +120,17 @@ if ($_POST) { write_config(); + $ruleno = captiveportal_get_ipfw_passthru_ruleno($mac['mac']); + if ($ruleno) { + captiveportal_free_ipfw_ruleno($ruleno); + $rules = "delete {$ruleno}\n"; + $rules .= "delete " . ++$ruleno . "\n"; + $rules .= captiveportal_passthrumac_configure_entry($mac); + file_put_contents("{$g['tmp_path']}/tmpmacedit{$id}", $rules); + mwexec("/sbin/ipfw -q {$g['tmp_path']}/tmpmacedit{$id}"); + @unlink("{$g['tmp_path']}/tmpmacedit{$id}"); + } + header("Location: services_captiveportal_mac.php"); exit; } |