summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErik Fonnesbeck <efonnes@gmail.com>2010-07-06 13:14:20 -0600
committerErik Fonnesbeck <efonnes@gmail.com>2010-07-06 13:14:20 -0600
commit89e7778f20edde6a958d15c789c01422d761c028 (patch)
tree9ee1cbfeedba5a84486bde5cb33c03a3a6e96323 /etc
parentc8dc187cef7d38eec89f91867805c50d08d94089 (diff)
downloadpfsense-89e7778f20edde6a958d15c789c01422d761c028.zip
pfsense-89e7778f20edde6a958d15c789c01422d761c028.tar.gz
Fix up checks for changing wireless regulatory settings.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/interfaces.inc18
1 files changed, 7 insertions, 11 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 004f2b3..cfa8e30 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -2127,21 +2127,17 @@ EOD;
unset($output);
$reg_changing = false;
- if ($wlcfg['regdomain'] && !preg_match("/\sregdomain\s+{$wlcfg['regdomain']}\s/si", $ifconfig_str))
+ /* special case for the debug country code */
+ if ($wlcfg['regcountry'] == 'DEBUG' && !preg_match("/\sregdomain\s+DEBUG\s/si", $ifconfig_str))
+ $reg_changing = true;
+ else if ($wlcfg['regdomain'] && !preg_match("/\sregdomain\s+{$wlcfg['regdomain']}\s/si", $ifconfig_str))
$reg_changing = true;
else if ($wlcfg['regcountry'] && !preg_match("/\scountry\s+{$wlcfg['regcountry']}\s/si", $ifconfig_str))
$reg_changing = true;
- /* anywhere needs a special case, since it is not included in the ifconfig output.
- * Do not combine this if with the one inside. */
- else if ($wlcfg['reglocation'] == 'anywhere') {
- if (preg_match("/\s(indoor|outdoor)\s/si", $ifconfig_str))
- $reg_changing = true;
- } else if ($wlcfg['reglocation'] && !preg_match("/\s{$wlcfg['reglocation']}\s/si", $ifconfig_str))
+ else if ($wlcfg['reglocation'] == 'anywhere' && preg_match("/\s(indoor|outdoor)\s/si", $ifconfig_str))
+ $reg_changing = true;
+ } else if ($wlcfg['reglocation'] && $wlcfg['reglocation'] != 'anywhere' && !preg_match("/\s{$wlcfg['reglocation']}\s/si", $ifconfig_str))
$reg_changing = true;
-
- /* special case for the debug country code */
- if ($wlcfg['regcountry'] == 'DEBUG' && preg_match("/\sregdomain\s+DEBUG\s/si", $ifconfig_str))
- $reg_changing = false;
if ($reg_changing) {
/* set regulatory domain */
OpenPOWER on IntegriCloud