Skip to content

Commit

Permalink
firewall: also exclude reply-to and route-to
Browse files Browse the repository at this point in the history
  • Loading branch information
fichtner committed Jul 31, 2022
1 parent c21cafa commit b5bda2b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/opnsense/mvc/app/library/OPNsense/Firewall/Rule.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,11 @@ protected function convertAddress(&$rule)
}
} elseif (!empty($interfaces[$network_name]['if'])) {
$rule[$target] = "({$interfaces[$network_name]['if']}:network)";
if ($rule['ipprotocol'] == 'inet6' && $this instanceof FilterRule && $rule['interface'] == $network_name) {
/* historically pf(4) excludes link-local on :network to avoid anti-spoof overlap */
$rule[$target] .= ',fe80::/10';
if ($rule['ipprotocol'] == 'inet6' && $rule['interface'] == $network_name) {
if ($this instanceof FilterRule && empty($rule['gateway']) && empty($rule['reply'])) {
/* historically pf(4) excludes link-local on :network to avoid anti-spoof overlap */
$rule[$target] .= ',fe80::/10';
}
}
} elseif (Util::isIpAddress($rule[$tag]['network']) || Util::isSubnet($rule[$tag]['network'])) {
$rule[$target] = $rule[$tag]['network'];
Expand Down

0 comments on commit b5bda2b

Please sign in to comment.