summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-05-28 13:01:07 +0000
committerErmal Luçi <eri@pfsense.org>2009-05-28 13:01:31 +0000
commit33bf18748123145d2ae06c189748dd14ccf0b014 (patch)
tree0cbc37d5d9dbc88ed9e24d763dd17282d9301449
parent324d622f1618fd3fcdb6a4dea54dc0bd6ecec891 (diff)
downloadpfsense-33bf18748123145d2ae06c189748dd14ccf0b014.zip
pfsense-33bf18748123145d2ae06c189748dd14ccf0b014.tar.gz
Fix the issue reported on http://forum.pfsense.org/index.php/topic,16559.0.html. Basically a missing convertion from 'source'/'destination' to target.
-rw-r--r--etc/inc/filter.inc7
-rwxr-xr-xusr/local/www/firewall_rules_edit.php9
2 files changed, 6 insertions, 10 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index 36f4eed..0efc70a 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -1074,7 +1074,7 @@ function filter_generate_address(& $rule, $target = "source")
$src = "any";
} else if ($rule[$target]['network']) {
if (strstr($rule[$target]['network'], "opt")) {
- $src = $FilterIflist[$rule['source'][$target]]['sa'] . "/" .
+ $src = $FilterIflist[$rule[$target][$target]]['sa'] . "/" .
$FilterIflist[$rule[$target]['network']]['sn'];
if (isset($rule[$target]['not'])) $src = " !{$src}";
/* check for opt$NUMip here */
@@ -1085,6 +1085,11 @@ function filter_generate_address(& $rule, $target = "source")
}
} else {
switch ($rule[$target]['network']) {
+ case 'wan':
+ $wansa = $FilterIflist['wan']['sa'];
+ $wansn = $FilterIflist['wan']['sn'];
+ $src = "{$wansa}/{$wansn}";
+ break;
case 'wanip':
$src = $FilterIflist["wan"]['ip'];
break;
diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php
index 5e3f20e..355ac1d 100755
--- a/usr/local/www/firewall_rules_edit.php
+++ b/usr/local/www/firewall_rules_edit.php
@@ -653,15 +653,6 @@ include("head.inc");
<option value="any" <?php if ($pconfig['src'] == "any") { echo "selected"; } ?>>any</option>
<option value="single" <?php if (($pconfig['srcmask'] == 32) && !$sel) { echo "selected"; $sel = 1; } ?>>Single host or alias</option>
<option value="network" <?php if (!$sel) echo "selected"; ?>>Network</option>
- <?php if(have_ruleint_access("wan")): ?>
- <option value="wanip" <?php if ($pconfig['src'] == "wanip") { echo "selected"; } ?>>WAN address</option>
- <?php endif; ?>
- <?php if(have_ruleint_access("lan")): ?>
- <option value="lanip" <?php if ($pconfig['src'] == "lanip") { echo "selected"; } ?>>LAN address</option>
- <?php endif; ?>
- <?php if(have_ruleint_access("lan")): ?>
- <option value="lan" <?php if ($pconfig['src'] == "lan") { echo "selected"; } ?>>LAN subnet</option>
- <?php endif; ?>
<?php if(have_ruleint_access("pptp")): ?>
<option value="pptp" <?php if ($pconfig['src'] == "pptp") { echo "selected"; } ?>>PPTP clients</option>
<?php endif; ?>
OpenPOWER on IntegriCloud