mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Skip reflection rdrs where the interface doesn't have an IP. Ticket #4564
This commit is contained in:
parent
b0c8f6dead
commit
eae4f953f6
@ -2032,7 +2032,13 @@ function filter_nat_rules_generate() {
|
||||
if(isset($rule['destination']['any'])) {
|
||||
/* With reflection enabled, destination of 'any' has side effects
|
||||
* that most people would not expect, so change it on reflection rules. */
|
||||
$dstaddr_reflect = $FilterIflist[$natif]['ip'];
|
||||
if (!empty($FilterIflist[$natif]['ip'])) {
|
||||
$dstaddr_reflect = $FilterIflist[$natif]['ip'];
|
||||
} else {
|
||||
// no IP, bail
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!empty($FilterIflist[$natif]['sn']))
|
||||
$dstaddr_reflect = gen_subnet($dstaddr_reflect, $FilterIflist[$natif]['sn']) . '/' . $FilterIflist[$natif]['sn'];
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user