Actually insert the interface address when the option is specified.

This commit is contained in:
Scott Ullrich 2008-10-14 18:24:34 +00:00
parent 981cf4aed3
commit 915ffd5f8b

View File

@ -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)
}
?>
?>