mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Validate if src OR dst have IP address set when protocol is IPv4+v6. Fixes #3499
This commit is contained in:
parent
2ccaa57559
commit
6bb99c3fe0
@ -420,11 +420,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'];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user