summaryrefslogtreecommitdiffstats
path: root/etc/inc/captiveportal.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-10-02 00:51:38 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-10-02 00:51:38 +0000
commit856e58a60b53e1304e69a5eb75f45cc793ab7f47 (patch)
tree23a3b18c0a342a90b0ea0f81f5ab2dbdb746f548 /etc/inc/captiveportal.inc
parentb7ec2b9ea21bf22664637a496c0c7e0b4e5ea072 (diff)
downloadpfsense-856e58a60b53e1304e69a5eb75f45cc793ab7f47.zip
pfsense-856e58a60b53e1304e69a5eb75f45cc793ab7f47.tar.gz
Unbreak radius auth
Diffstat (limited to 'etc/inc/captiveportal.inc')
-rw-r--r--etc/inc/captiveportal.inc29
1 files changed, 29 insertions, 0 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc
index f85ef54..064916b 100644
--- a/etc/inc/captiveportal.inc
+++ b/etc/inc/captiveportal.inc
@@ -38,6 +38,7 @@
require_once("functions.inc");
require_once("radius_authentication.inc");
require_once("radius_accounting.inc");
+require_once("radius.inc");
$lockfile = "{$g['varrun_path']}/captiveportal.lock";
@@ -990,4 +991,32 @@ function captiveportal_get_next_ipfw_ruleno($rulenos_start = 10000, $rulenos_ran
return $ruleno;
}
+/**
+ * Get the NAS-Identifier
+ *
+ * We will use our local hostname to make up the nas_id
+ */
+function getNasID()
+{
+ exec("/bin/hostname", $nasId);
+ if(!$nasId[0])
+ $nasId[0] = "pfSense";
+ return $nasId[0];
+}
+
+/**
+ * Get the NAS-IP-Address based on the current wan address
+ *
+ * Use functions in interfaces.inc to find this out
+ *
+ */
+
+function getNasIP()
+{
+ $nasIp = get_current_wan_address();
+ if(!$nasIp)
+ $nasIp = "0.0.0.0";
+ return $nasIp;
+}
+
?> \ No newline at end of file
OpenPOWER on IntegriCloud