summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2012-06-11 07:00:48 +0000
committerErmal <eri@pfsense.org>2012-06-11 07:00:48 +0000
commit805b9ab69b868f385cb95742e3b9b53068ffb7f0 (patch)
tree363a7595537f4694692db39eeb8991fa6c644b7e /etc/inc
parente0ad13cdf6fc1f61727c84a0db8f59f28fb8a79c (diff)
downloadpfsense-805b9ab69b868f385cb95742e3b9b53068ffb7f0.zip
pfsense-805b9ab69b868f385cb95742e3b9b53068ffb7f0.tar.gz
Revert "Make mac_format aware of multiple Captiveportal instances"
This reverts commit 54df925b9ea447bdd10f88a886e2ef11d44c3059.
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/captiveportal.inc2
-rw-r--r--etc/inc/util.inc5
2 files changed, 3 insertions, 4 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc
index 3984088..55fb46a 100644
--- a/etc/inc/captiveportal.inc
+++ b/etc/inc/captiveportal.inc
@@ -1669,7 +1669,7 @@ function portal_mac_radius($clientmac,$clientip) {
$radmac_secret = $config['captiveportal'][$cpzone]['radmac_secret'];
/* authentication against the radius server */
- $username = mac_format($clientmac, $cpzone);
+ $username = mac_format($clientmac);
$auth_list = radius($username,$radmac_secret,$clientip,$clientmac,"MACHINE LOGIN");
if ($auth_list['auth_val'] == 2)
return TRUE;
diff --git a/etc/inc/util.inc b/etc/inc/util.inc
index 88cce91..6146d7c 100644
--- a/etc/inc/util.inc
+++ b/etc/inc/util.inc
@@ -1205,12 +1205,11 @@ function xml_safe_fieldname($fieldname) {
return strtolower(str_replace($replace, "", $fieldname));
}
-function mac_format($clientmac, $zone = false) {
+function mac_format($clientmac) {
global $config;
$mac = explode(":", $clientmac);
- if ($zone)
- $mac_format = $zone ? $config['captiveportal'][$zone]['radmac_format'] : false;
+ $mac_format = $config['captiveportal']['radmac_format'] ? $config['captiveportal']['radmac_format'] : false;
switch($mac_format) {
case 'singledash':
OpenPOWER on IntegriCloud