summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorErik Fonnesbeck <efonnes@gmail.com>2012-12-08 18:02:48 -0700
committerErik Fonnesbeck <efonnes@gmail.com>2012-12-08 18:02:48 -0700
commit6ef2297b859e0d8723891c16a910674338d16065 (patch)
tree80eb8dee095e46df9716adf079b39ee5a34835c2 /etc/inc
parent6ca4713aaa95ed2bd99e41c1e083ed0cf97aedab (diff)
downloadpfsense-6ef2297b859e0d8723891c16a910674338d16065.zip
pfsense-6ef2297b859e0d8723891c16a910674338d16065.tar.gz
Add extra checks for reading and saving certain wireless settings and fix an existing check.
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/interfaces.inc8
1 files changed, 4 insertions, 4 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index e9e2c95..75058ff 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -395,7 +395,7 @@ function interfaces_create_wireless_clones() {
if($g['booting'])
echo gettext("Creating other wireless clone interfaces...");
- if (is_array($config['wireless']['clone']) && count($config['wireless']['clone'])) {
+ if (isset($config['wireless']['clone']) && is_array($config['wireless']['clone']) && count($config['wireless']['clone'])) {
foreach ($config['wireless']['clone'] as $clone) {
if(empty($clone['cloneif']))
continue;
@@ -2167,7 +2167,7 @@ function interface_sync_wireless_clones(&$ifcfg, $sync_changes = false) {
}
// Read or write settings at shared area
- if (isset($config['wireless']['interfaces'][$baseif])) {
+ if (isset($config['wireless']['interfaces'][$baseif]) && is_array($config['wireless']['interfaces'][$baseif])) {
foreach ($shared_settings as $setting) {
if ($sync_changes) {
if (isset($ifcfg['wireless'][$setting]))
@@ -2184,7 +2184,7 @@ function interface_sync_wireless_clones(&$ifcfg, $sync_changes = false) {
}
// Sync the mode on the clone creation page with the configured mode on the interface
- if (interface_is_wireless_clone($ifcfg['if'])) {
+ if (interface_is_wireless_clone($ifcfg['if']) && isset($config['wireless']['clone']) && is_array($config['wireless']['clone'])) {
foreach ($config['wireless']['clone'] as &$clone) {
if ($clone['cloneif'] == $ifcfg['if']) {
if ($sync_changes) {
@@ -2557,7 +2557,7 @@ EOD;
$clone_list = array();
if (does_interface_exist(interface_get_wireless_clone($baseif)))
$clone_list[] = interface_get_wireless_clone($baseif);
- if (is_array($config['wireless']['clone'])) {
+ if (isset($config['wireless']['clone']) && is_array($config['wireless']['clone'])) {
foreach ($config['wireless']['clone'] as $clone) {
if ($clone['if'] == $baseif)
$clone_list[] = $clone['cloneif'];
OpenPOWER on IntegriCloud