mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 08:09:41 +00:00
fix php warning: Undefined array key "XXX" in /usr/local/opnsense/mvc/app/library/OPNsense/Firewall/SNatRule.php on line 95
This commit is contained in:
parent
002b450c40
commit
5b8f903e53
@ -92,10 +92,11 @@ class SNatRule extends Rule
|
||||
$rule['disabled'] = true;
|
||||
}
|
||||
} elseif (preg_match("/^(wan|lan|opt[0-9]+)ip$/", $rule['target'], $matches)) {
|
||||
$rule['target'] = "({$this->interfaceMapping["{$matches[1]}"]['if']}:0)";
|
||||
if (empty($this->interfaceMapping["{$matches[1]}"])) {
|
||||
$this->log("SNAT / target missing");
|
||||
$rule['disabled'] = true;
|
||||
} else {
|
||||
$rule['target'] = "({$this->interfaceMapping["{$matches[1]}"]['if']}:0)";
|
||||
}
|
||||
}
|
||||
foreach (array("sourceport", "dstport", "natport") as $fieldname) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user