summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-05-27 12:01:33 -0400
committerjim-p <jimp@pfsense.org>2011-05-27 12:02:22 -0400
commitf40a03a45cc5394bd61861e1dcf327befac16eee (patch)
treefc41028f26be4a64f45cb2ec717931741946ff31 /etc
parent685c977602be47c6b80204953d398171ca7cb0b9 (diff)
downloadpfsense-f40a03a45cc5394bd61861e1dcf327befac16eee.zip
pfsense-f40a03a45cc5394bd61861e1dcf327befac16eee.tar.gz
Only add pppoe to the interfaces list if it both has an entry and is in server mode (i.e. not disabled.)
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/filter.inc8
1 files changed, 5 insertions, 3 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index 47a3bad..e5e173c 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -801,8 +801,8 @@ function filter_generate_optcfg_array() {
$oic['virtual'] = true;
$FilterIflist['l2tp'] = $oic;
}
- if (is_array($config['pppoes']['pppoe'])) {
- $FilterIflist['pppoe'] = array();
+ if (is_array($config['pppoes']['pppoe']) && (count($config['pppoes']['pppoe']) > 0)) {
+ $pppoeifs = array();
foreach($config['pppoes']['pppoe'] as $pppoe) {
if ($pppoe['mode'] == "server") {
$oic = array();
@@ -816,9 +816,11 @@ function filter_generate_optcfg_array() {
$oic['sn'] = $pppoe['pppoe_subnet'];
else
$oic['sn'] = "32";
- $FilterIflist['pppoe'][] = $oic;
+ $pppoeifs[] = $oic;
}
}
+ if (count($pppoeifs))
+ $FilterIflist['pppoe'] = $pppoeifs;
}
/* add ipsec interfaces */
if(isset($config['ipsec']['enable']) || isset($config['ipsec']['client']['enable'])) {
OpenPOWER on IntegriCloud