diff options
author | bcyrill <cyrill@bannwart.info> | 2013-01-27 15:46:54 +0100 |
---|---|---|
committer | bcyrill <cyrill@bannwart.info> | 2013-01-27 15:46:54 +0100 |
commit | 1f8c88190a610bc4fb732019e1b0dcdc2d7dd121 (patch) | |
tree | 0010777399d9b7b8cc0c77fa0e991400a804572a /usr/local/www | |
parent | 9d33c8571fdbc757fb1eb54f5743e6fcee31edb3 (diff) | |
download | pfsense-1f8c88190a610bc4fb732019e1b0dcdc2d7dd121.zip pfsense-1f8c88190a610bc4fb732019e1b0dcdc2d7dd121.tar.gz |
Fix ipfw config generation for allowed IPs
Diffstat (limited to 'usr/local/www')
-rwxr-xr-x | usr/local/www/services_captiveportal_ip_edit.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/usr/local/www/services_captiveportal_ip_edit.php b/usr/local/www/services_captiveportal_ip_edit.php index fa2f1ff..8c8c79e 100755 --- a/usr/local/www/services_captiveportal_ip_edit.php +++ b/usr/local/www/services_captiveportal_ip_edit.php @@ -145,18 +145,18 @@ if ($_POST) { write_config(); if (isset($a_cp[$cpzone]['enable']) && is_module_loaded("ipfw.ko")) { - if (is_ipaddr($oldip)) { - if (!empty($oldmask)) - $ipfw = pfSense_ipfw_getTablestats($cpzone, 3, $oldip, $oldmask); - else - $ipfw = pfSense_ipfw_getTablestats($cpzone, 3, $oldip); - } - $rules = "table 3 delete {$oldip}"; - $rules .= "table 4 delete {$oldip}"; + if (is_ipaddr($oldip)) { + if (!empty($oldmask)) + $ipfw = pfSense_ipfw_getTablestats($cpzone, 3, $oldip, $oldmask); + else + $ipfw = pfSense_ipfw_getTablestats($cpzone, 3, $oldip); + } + $rules = "table 3 delete {$oldip}\n"; + $rules .= "table 4 delete {$oldip}\n"; if (is_array($ipfw)) { captiveportal_free_dn_ruleno($ipfw['dnpipe']); - $rules .= "pipe delete {$ipfw['dnpipe']}"; - $rules .= "pipe delete " . ($ipfw['dnpipe']+1); + $rules .= "pipe delete {$ipfw['dnpipe']}\n"; + $rules .= "pipe delete " . ($ipfw['dnpipe']+1 . "\n"); } $rules .= captiveportal_allowedip_configure_entry($ip); $uniqid = uniqid("{$cpzone}_allowed"); |