diff options
author | Renato Botelho <garga@FreeBSD.org> | 2014-03-03 15:15:53 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2014-03-03 15:16:01 -0300 |
commit | de9ac478b3a846cc4068d21c0cb5cf8f8097e22b (patch) | |
tree | 1fd2b09db421e5c4696427ad2bd6ce9ea2fef24e /usr/local/www/firewall_rules_edit.php | |
parent | d07bc322c58f13d62bb6416b22e29983ef75b02f (diff) | |
download | pfsense-de9ac478b3a846cc4068d21c0cb5cf8f8097e22b.zip pfsense-de9ac478b3a846cc4068d21c0cb5cf8f8097e22b.tar.gz |
Validate if src OR dst have IP address set when protocol is IPv4+v6. Fixes #3499
Diffstat (limited to 'usr/local/www/firewall_rules_edit.php')
-rwxr-xr-x | usr/local/www/firewall_rules_edit.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php index 9eafdd3..7430b0e 100755 --- a/usr/local/www/firewall_rules_edit.php +++ b/usr/local/www/firewall_rules_edit.php @@ -423,11 +423,11 @@ if ($_POST) { $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((is_ipaddr($_POST['src']) || is_ipaddr($_POST['dst'])) && ($_POST['ipprotocol'] == "inet46")) - $input_errors[] = gettext("You can not use a IPv4 or IPv6 address in combined IPv4 + IPv6 rules."); - } + if((is_ipaddr($_POST['src']) || is_ipaddr($_POST['dst'])) && ($_POST['ipprotocol'] == "inet46")) + $input_errors[] = gettext("You can not use a IPv4 or IPv6 address in combined IPv4 + IPv6 rules."); + if ($_POST['srcbeginport'] > $_POST['srcendport']) { /* swap */ $tmp = $_POST['srcendport']; |