Skip to content

Commit

Permalink
There is no longer any need to restrict protocols for IPv4+IPv6 rules…
Browse files Browse the repository at this point in the history
…, the appropriate ruleset is generated and problem scenarios that would otherwise break here are prevented by other input validation.
  • Loading branch information
Chris Buechler committed Apr 4, 2015
1 parent dc17a9d commit 72992b8
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions usr/local/www/firewall_rules_edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,11 +298,6 @@ function is_aoadv_used($rule_config) {
$input_errors[] = gettext("You can not assign an IPv6 Gateway to an IPv4 Filter rule");
}
}

if (($_POST['proto'] != "tcp") && ($_POST['proto'] != "udp") && ($_POST['proto'] != "tcp/udp") && ($_POST['proto'] != "icmp")) {
if($_POST['ipprotocol'] == "inet46")
$input_errors[] = gettext("You can not assign a protocol other than ICMP, TCP, UDP or TCP/UDP to a rule that applies to IPv4 and IPv6");
}
if (($_POST['proto'] == "icmp") && ($_POST['icmptype'] <> "")){
if($_POST['ipprotocol'] == "inet46")
$input_errors[] = gettext("You can not assign a ICMP type to a rule that applies to IPv4 and IPv6");
Expand Down

0 comments on commit 72992b8

Please sign in to comment.