diff options
author | Ermal Luçi <eri@pfsense.org> | 2010-01-27 20:19:42 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2010-01-27 20:19:42 +0000 |
commit | 37a23c2dd90c32492b3cf43f9126e5f4153ccb78 (patch) | |
tree | 5f8091ecf3a1009f19ade171101a2df91272e05f /etc/inc/filter.inc | |
parent | 73780aef930a96dac5e1a2350e70e8003ddb5a38 (diff) | |
download | pfsense-37a23c2dd90c32492b3cf43f9126e5f4153ccb78.zip pfsense-37a23c2dd90c32492b3cf43f9126e5f4153ccb78.tar.gz |
Try to prevent breaking the ruleset when ppp is not connected. This should fix most problems with ppp.
Diffstat (limited to 'etc/inc/filter.inc')
-rw-r--r-- | etc/inc/filter.inc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index a9cc9ac..07274d9 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -593,6 +593,8 @@ function filter_generate_optcfg_array() { $oc = $config['interfaces'][$if]; $oic = array(); $oic['if'] = get_real_interface($if); + if (!does_interface_exist($oic['if'])) + continue; $oic['ip'] = get_interface_ip($if); if(!is_ipaddr($oc['ipaddr']) && !empty($oc['ipaddr'])) $oic['type'] = $oc['ipaddr']; @@ -2239,19 +2241,15 @@ function filter_tdr_month($schedule) { } function filter_setup_logging_interfaces() { - global $config; + global $config, $FilterIflist; if(isset($config['system']['developerspew'])) { $mt = microtime(); echo "filter_setup_logging_interfaces() being called $mt\n"; } $rules = ""; - $i = 0; - /* if list */ - $ifdescrs = get_configured_interface_list(); - foreach ($ifdescrs as $ifdescr => $ifname) { + foreach ($FilterIflist as $ifdescr => $ifname) { /* do not work with tun interfaces */ - $int = get_real_interface($ifname); - $rules .= "set loginterface {$int}\n"; + $rules .= "set loginterface {$ifname['if']}\n"; } return $rules; } |