From 2d064820ef6db1b6be5af0f464eefacbd1fdee14 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 19 Feb 2008 01:55:08 +0000 Subject: [PATCH] Backout my previous advice to CMB. It was grossly wrong. --- etc/inc/filter.inc | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 411cbb54a6..28eb61cee0 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -932,8 +932,13 @@ function filter_nat_rules_generate() { $natrules .= "\nno nat on \$wan to port tftp\n\n"; $natrules .= "\n# FTP Proxy/helper\n"; - /* get array of interfaces to work with */ - $iflist = get_interface_list(); + /* build an array of interfaces to work with */ + if($config['interfaces']['lan']) + $iflist = array("lan" => "LAN"); + else + $iflist = array(); + for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++) + $iflist['opt' . $i] = "opt{$i}"; $interface_counter = 0; $vpns_list = get_vpns_list(); /* prevent 1:1 ips from ftp-proxy, they will be handled by ftp-sesame */ @@ -2682,7 +2687,12 @@ EOD; $extaddr = alias_expand($extaddr); if(!isset($config['system']['disablenatreflection'])) { - $iflist = get_interface_list(); + + /* if list */ + if($config['interfaces']['lan']) + $iflist = array("lan" => "LAN"); + else + $iflist = array(); for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++) $iflist['opt' . $i] = "opt{$i}"; @@ -3456,4 +3466,4 @@ function return_vpn_subnet($adr) { } -?> \ No newline at end of file +?>