mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-18 10:35:27 +00:00
firewall: repair logic for ICMP fixup required by pfctl after refactor
PR: https://forum.opnsense.org/index.php?topic=7060.0
This commit is contained in:
parent
4adf757079
commit
a591cf1412
@ -222,14 +222,14 @@ class FilterRule extends Rule
|
||||
}
|
||||
// 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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user