summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_rules_edit.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@world.inf.org>2013-01-08 15:32:34 +0545
committerPhil Davis <phil.davis@world.inf.org>2013-01-08 15:32:34 +0545
commit889cbaefc75b8b242ac7e7889daf0b4ae681d036 (patch)
tree03bd0945602a0bee1fb69f23113c302bd0b8007d /usr/local/www/firewall_rules_edit.php
parent1b0074d5d139e71e1540230c3d2e36d71ccaf550 (diff)
downloadpfsense-889cbaefc75b8b242ac7e7889daf0b4ae681d036.zip
pfsense-889cbaefc75b8b242ac7e7889daf0b4ae681d036.tar.gz
Display gateways with matching IP protocol in Gateways list
Some gateways do not have traditional addresses hard-coded into them - e.g. for OpenVPN dynamic gateways are created in software on-the-fly (they are not actually entries in the config). So traditional tests like is_ipaddrv4 are not useful to determine if the gateway is IPv4 or IPv6. return_gateways_array() fills in an "ipprotocol" entry for each returned gateway ("inet" or "inet6"), as well as the "gateway" address field. This can be used to determine if the gateway is for IPv4 or IPv6.
Diffstat (limited to 'usr/local/www/firewall_rules_edit.php')
-rwxr-xr-xusr/local/www/firewall_rules_edit.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php
index c88c57c..3bec648 100755
--- a/usr/local/www/firewall_rules_edit.php
+++ b/usr/local/www/firewall_rules_edit.php
@@ -1364,9 +1364,9 @@ $i--): ?>
foreach($gateways as $gwname => $gw) {
if(($pconfig['ipprotocol'] == "inet46"))
continue;
- if(($pconfig['ipprotocol'] == "inet6") && !is_ipaddrv6($gw['gateway']))
+ if(($pconfig['ipprotocol'] == "inet6") && !(($gw['ipprotocol'] == "inet6") || (is_ipaddrv6($gw['gateway']))))
continue;
- if(($pconfig['ipprotocol'] == "inet") && !is_ipaddrv4($gw['gateway']))
+ if(($pconfig['ipprotocol'] == "inet") && !(($gw['ipprotocol'] == "inet") || (is_ipaddrv4($gw['gateway']))))
continue;
if($gw == "")
continue;
OpenPOWER on IntegriCloud