diff options
author | Bill Marquette <billm@pfsense.org> | 2005-08-24 01:18:49 +0000 |
---|---|---|
committer | Bill Marquette <billm@pfsense.org> | 2005-08-24 01:18:49 +0000 |
commit | 645eb5329dbc88d68506ddc9610399eee9e79281 (patch) | |
tree | 8cc544b558afe97d88dd32744cb92c605b4e5f2c | |
parent | 90e4939ad3697f0c99834b963c5194a0d4965629 (diff) | |
download | pfsense-645eb5329dbc88d68506ddc9610399eee9e79281.zip pfsense-645eb5329dbc88d68506ddc9610399eee9e79281.tar.gz |
Allow any to be used for source address
-rwxr-xr-x | usr/local/www/firewall_nat_out_edit.php | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/usr/local/www/firewall_nat_out_edit.php b/usr/local/www/firewall_nat_out_edit.php index 114f5a1..ea8ef59 100755 --- a/usr/local/www/firewall_nat_out_edit.php +++ b/usr/local/www/firewall_nat_out_edit.php @@ -78,6 +78,10 @@ if ($_POST) { $_POST['destination'] = "any"; $_POST['destination_subnet'] = 24; } + if ($_POST['source_type'] == "any") { + $_POST['source'] = "any"; + $_POST['source_subnet'] = 24; + } unset($input_errors); $pconfig = $_POST; @@ -88,11 +92,13 @@ if ($_POST) { do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); - if ($_POST['source'] && !is_ipaddr($_POST['source']) && $_POST['source'] <> "any") { - $input_errors[] = "A valid source must be specified."; - } - if ($_POST['source_subnet'] && !is_numericint($_POST['source_subnet'])) { - $input_errors[] = "A valid source bit count must be specified."; + if ($_POST['source_type'] != "any") { + if ($_POST['source'] && !is_ipaddr($_POST['source']) && $_POST['source'] <> "any") { + $input_errors[] = "A valid source must be specified."; + } + if ($_POST['source_subnet'] && !is_numericint($_POST['source_subnet'])) { + $input_errors[] = "A valid source bit count must be specified."; + } } if ($_POST['sourceport'] && !is_numericint($_POST['sourceport'])) { $input_errors[] = "A valid source port must be specified."; |