From d12e0997b002da46e95c5ace7ffd0962f08d1a9a Mon Sep 17 00:00:00 2001 From: Seth Mos Date: Sat, 5 May 2007 20:24:28 +0000 Subject: [PATCH] Do not create nat on rules for opt interfaces with a gateway. --- etc/inc/filter.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 3a2c58dc8d..b2b93b3a2e 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -716,7 +716,7 @@ function filter_nat_rules_generate() { update_filter_reload_status("Creating outbound rules (opt{$i})"); $optcfg = $config['interfaces']['opt' . $i]; - if (isset($optcfg['enable']) && !$optcfg['bridge']) { + if ((isset ($optcfg['enable'])) && (!$optcfg['bridge']) && (interface_has_gateway("$opt_interface"))) { $optsa = gen_subnet($optcfg['ipaddr'], $optcfg['subnet']); /* create outbound nat entries for primary wan */ @@ -3272,4 +3272,4 @@ function return_vpn_subnet($adr) { } -?> \ No newline at end of file +?>