diff options
author | Chris Buechler <cmb@pfsense.org> | 2016-04-20 02:30:16 -0500 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2016-04-20 02:30:16 -0500 |
commit | e5a1ddb50e1d20ae86d02ef1c7f7ee7a907258e2 (patch) | |
tree | 45365052895a5d3ded80e420924448efe59412b1 /src/usr/local | |
parent | 0f2fd77ac32a97eef82b59a1271e6fad83314666 (diff) | |
download | pfsense-e5a1ddb50e1d20ae86d02ef1c7f7ee7a907258e2.zip pfsense-e5a1ddb50e1d20ae86d02ef1c7f7ee7a907258e2.tar.gz |
Fix validation of v4 in v6 rules and vice versa. Ticket #6211
Diffstat (limited to 'src/usr/local')
-rw-r--r-- | src/usr/local/www/firewall_rules_edit.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/usr/local/www/firewall_rules_edit.php b/src/usr/local/www/firewall_rules_edit.php index 6fefbbe..9b4b63e 100644 --- a/src/usr/local/www/firewall_rules_edit.php +++ b/src/usr/local/www/firewall_rules_edit.php @@ -563,12 +563,12 @@ if ($_POST) { 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("IPv6 addresses can not be used in IPv4 rules."); - } - if ((is_ipaddrv4($_POST['src']) || is_ipaddrv4($_POST['dst'])) && ($_POST['ipprotocol'] == "inet6")) { - $input_errors[] = gettext("IPv4 addresses can not be used in IPv6 rules."); - } + } + if ((is_ipaddrv6($_POST['src']) || is_ipaddrv6($_POST['dst'])) && ($_POST['ipprotocol'] == "inet")) { + $input_errors[] = gettext("IPv6 addresses cannot be used in IPv4 rules."); + } + if ((is_ipaddrv4($_POST['src']) || is_ipaddrv4($_POST['dst'])) && ($_POST['ipprotocol'] == "inet6")) { + $input_errors[] = gettext("IPv4 addresses can not be used in IPv6 rules."); } if ((is_ipaddr($_POST['src']) || is_ipaddr($_POST['dst'])) && ($_POST['ipprotocol'] == "inet46")) { |