mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Actually insert the interface address when the option is specified.
This commit is contained in:
parent
981cf4aed3
commit
915ffd5f8b
@ -523,11 +523,15 @@ function filter_nat_rules_generate_if($if, $src = "any", $srcport = "", $dst = "
|
||||
if($src == "/32" || $src{0} == "/")
|
||||
return "# src incorrectly specified\n";
|
||||
|
||||
/* Use interface name if IP isn't specified */
|
||||
if ($natip != "")
|
||||
if ($natip != "") {
|
||||
$tgt = "{$natip}/32";
|
||||
} else {
|
||||
$natip = get_current_wan_address($if);
|
||||
if($natip)
|
||||
$tgt = "{$natip}/32";
|
||||
else
|
||||
$tgt = "(". get_real_wan_interface($if).")";
|
||||
else
|
||||
$tgt = "($if)";
|
||||
}
|
||||
|
||||
/* Add the hard set source port (useful for ISAKMP) */
|
||||
if ($natport != "")
|
||||
@ -2889,4 +2893,4 @@ function return_vpn_subnet($adr)
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
Loading…
Reference in New Issue
Block a user