Skip to content

Commit

Permalink
firewall: repair logic for ICMP fixup required by pfctl after refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
fichtner committed Jan 30, 2018
1 parent 612a96e commit f26883d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/opnsense/mvc/app/library/OPNsense/Firewall/FilterRule.php
Expand Up @@ -222,14 +222,14 @@ private function parseFilterRules()
}
// icmp-type switch (ipv4/ipv6)
if ($rule['protocol'] == "icmp" && !empty($rule['icmptype'])) {
if ($ipproto == 'inet') {
if ($rule['ipprotocol'] == 'inet') {
$rule['icmp-type'] = $rule['icmptype'];
} elseif ($ipproto == 'inet6') {
} elseif ($rule['ipprotocol']== 'inet6') {
$rule['icmp6-type'] = $rule['icmptype'];
}
}
// icmpv6
if ($ipproto == 'inet6' && !empty($rule['protocol']) && $rule['protocol'] == "icmp") {
if ($rule['ipprotocol'] == 'inet6' && !empty($rule['protocol']) && $rule['protocol'] == "icmp") {
$rule['protocol'] = 'ipv6-icmp';
}
// set prio
Expand Down

0 comments on commit f26883d

Please sign in to comment.