firewall: resolve IPs in kernel for force gw rule

PR: https://forum.opnsense.org/index.php?topic=22214.0
This commit is contained in:
Franco Fichtner 2021-03-23 20:04:40 +01:00 committed by Ad Schellevis
parent fda1e024f2
commit 3fe7b5f060

View File

@ -607,7 +607,7 @@ function filter_core_rules_system($fw, $defaults)
if (($gwproto == 'inet' && $intf_has_v4) || ($gwproto == 'inet6' && $intf_has_v6)) {
$fw->registerFilterRule(
100000,
array('from' => $ifcfg['if'], 'direction' => 'out', 'gateway' => $gwname,
array('from' => "({$ifcfg['if']})", 'direction' => 'out', 'gateway' => $gwname,
'destination' => array('network' => $ifdescr, "not" => true),
'statetype' => 'keep',
'allowopts' => true,