From ab900a0916ff5bf2dde0784b9bbe6bac8208dd3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ermal=20Lu=C3=A7i?= Date: Wed, 30 Jul 2008 16:53:28 +0000 Subject: [PATCH] Remove generating entries when knob is set forinterfaces. It was awkward cause it tried to use the ip of the interface bridged with! Furthemore we do bridging differently now so no need to keep that around too. --- etc/inc/filter.inc | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 97eb065dff..cf02e66625 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -427,29 +427,14 @@ function generate_optcfg_array() $oic = array(); $oic['if'] = get_real_wan_interface($if); - if ($oc['bridge']) { - if (isset($config['interfaces'][$oc['bridge']]['enable']) && - is_ipaddr($config['interfaces'][$oc['bridge']]['ipaddr'])) { - $oic['ip'] = $config['interfaces'][$oc['bridge']]['ipaddr']; - $oic['sn'] = $config['interfaces'][$oc['bridge']]['subnet']; - $oic['sa'] = gen_subnet($oic['ip'], $oic['sn']); - } - $oic['descr'] = $ifdetail; - $oic['nonat'] = $oc['nonat']; - $oic['alias-address'] = $oc['alias-address']; - $oic['alias-subnet'] = $oc['alias-subnet']; - $oic['gateway'] = $oc['gateway']; - $oic['bridge'] = 1; - } else { - $oic['ip'] = $oc['ipaddr']; - $oic['sn'] = $oc['subnet']; - $oic['descr'] = $ifdetail; - $oic['sa'] = gen_subnet($oic['ip'], $oic['sn']); - $oic['nonat'] = $oc['nonat']; - $oic['alias-address'] = $oc['alias-address']; - $oic['alias-subnet'] = $oc['alias-subnet']; - $oic['gateway'] = $oc['gateway']; - } + $oic['ip'] = $oc['ipaddr']; + $oic['sn'] = $oc['subnet']; + $oic['descr'] = $ifdetail; + $oic['sa'] = gen_subnet($oic['ip'], $oic['sn']); + $oic['nonat'] = $oc['nonat']; + $oic['alias-address'] = $oc['alias-address']; + $oic['alias-subnet'] = $oc['alias-subnet']; + $oic['gateway'] = $oc['gateway']; $FilterIflist[$if] = $oic; }