summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_rules_edit.php
diff options
context:
space:
mode:
authorSeth Mos <seth.mos@dds.nl>2011-08-24 21:21:24 +0200
committerSeth Mos <seth.mos@dds.nl>2011-08-24 21:21:56 +0200
commit4108dee880e7fd552d588101ce383938803eb149 (patch)
tree7883aa6255e858d4c6d307905e14535f0e94ffc2 /usr/local/www/firewall_rules_edit.php
parent197c30ae98aafb2a565c3937eded6a9b583b7baa (diff)
downloadpfsense-4108dee880e7fd552d588101ce383938803eb149.zip
pfsense-4108dee880e7fd552d588101ce383938803eb149.tar.gz
Catch another possiblity for invalid rule generation
Diffstat (limited to 'usr/local/www/firewall_rules_edit.php')
-rwxr-xr-xusr/local/www/firewall_rules_edit.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php
index 3f207a1..21fee77 100755
--- a/usr/local/www/firewall_rules_edit.php
+++ b/usr/local/www/firewall_rules_edit.php
@@ -355,6 +355,10 @@ if ($_POST) {
if((is_ipaddr($_POST['src']) && is_ipaddr($_POST['dst']))) {
if(!validate_address_family($_POST['src'], $_POST['dst']))
$input_errors[] = sprintf(gettext("The Source IP address %s Address Family differs from the destination %s."), $_POST['src'], $_POST['dst']);
+ if((is_ipaddrv6($_POST['src']) || is_ipaddrv6($_POST['dst'])) && ($_POST['ipprotocol'] == "inet"))
+ $input_errors[] = gettext("You can not use IPv6 addresses in IPv4 rules.");
+ if((is_ipaddrv4($_POST['src']) || is_ipaddrv4($_POST['dst'])) && ($_POST['ipprotocol'] == "inet6"))
+ $input_errors[] = gettext("You can not use IPv4 addresses in IPv6 rules.");
}
if ($_POST['srcbeginport'] > $_POST['srcendport']) {
OpenPOWER on IntegriCloud