diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-02-07 04:03:13 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-02-07 04:03:13 +0000 |
commit | 2a71debf6cdb058694cbff6640b35c74fb1c73dd (patch) | |
tree | ae21ce17bba88e68fb97c2478245d946b156b5aa /usr | |
parent | 8d6bd67301cfa6f1f56651e996786140b75396c0 (diff) | |
download | pfsense-2a71debf6cdb058694cbff6640b35c74fb1c73dd.zip pfsense-2a71debf6cdb058694cbff6640b35c74fb1c73dd.tar.gz |
Convert filter_configure to return the error text from pf if a ruleset is not loaded correctly for any reason
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/firewall_nat.php | 5 | ||||
-rwxr-xr-x | usr/local/www/firewall_rules.php | 5 | ||||
-rwxr-xr-x | usr/local/www/firewall_shaper.php | 4 |
3 files changed, 12 insertions, 2 deletions
diff --git a/usr/local/www/firewall_nat.php b/usr/local/www/firewall_nat.php index 386f3b8..ee1c83a 100755 --- a/usr/local/www/firewall_nat.php +++ b/usr/local/www/firewall_nat.php @@ -50,7 +50,10 @@ if ($_POST) { $retval |= filter_configure(); config_unlock(); } - $savemsg = get_std_save_message($retval); + if($retval == 0) + $savemsg = get_std_save_message($retval); + else + $savemsg = $retval; if ($retval == 0) { if (file_exists($d_natconfdirty_path)) diff --git a/usr/local/www/firewall_rules.php b/usr/local/www/firewall_rules.php index 7d1d99e..0634a66 100755 --- a/usr/local/www/firewall_rules.php +++ b/usr/local/www/firewall_rules.php @@ -66,7 +66,10 @@ if ($_POST) { $retval = filter_configure(); config_unlock(); } - $savemsg = get_std_save_message($retval); + if($retval == 0) + $savemsg = get_std_save_message($retval); + else + $savemsg = $retval; if ($retval == 0) { if (file_exists($d_natconfdirty_path)) unlink($d_natconfdirty_path); diff --git a/usr/local/www/firewall_shaper.php b/usr/local/www/firewall_shaper.php index a7d57b7..267772f 100755 --- a/usr/local/www/firewall_shaper.php +++ b/usr/local/www/firewall_shaper.php @@ -62,6 +62,10 @@ if ($_POST) { config_lock(); $retval = filter_configure(); config_unlock(); + if($retval == 0) + $savemsg = get_std_save_message($retval); + else + $savemsg = $retval; exec("rm " . $d_shaperconfdirty_path); } } |