summaryrefslogtreecommitdiffstats
path: root/etc/inc/openvpn.auth-user.php
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2010-03-02 20:19:05 +0000
committerErmal Luçi <eri@pfsense.org>2010-03-02 20:19:35 +0000
commitcc686d98fe3b7c1c34ccb97a9b30a57bfc2ab96e (patch)
tree61c6c6fe10a81f52b997f82697190a547295672a /etc/inc/openvpn.auth-user.php
parentf4a4d91ef2aa846d525d95379fd40acfde45ceb2 (diff)
downloadpfsense-cc686d98fe3b7c1c34ccb97a9b30a57bfc2ab96e.zip
pfsense-cc686d98fe3b7c1c34ccb97a9b30a57bfc2ab96e.tar.gz
Add the neccesary foo for radius.inc to work.
Diffstat (limited to 'etc/inc/openvpn.auth-user.php')
-rwxr-xr-xetc/inc/openvpn.auth-user.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/etc/inc/openvpn.auth-user.php b/etc/inc/openvpn.auth-user.php
index 2e94519..a611f8c 100755
--- a/etc/inc/openvpn.auth-user.php
+++ b/etc/inc/openvpn.auth-user.php
@@ -42,8 +42,43 @@
*/
require_once("config.inc");
+require_once("radius.inc");
require_once("auth.inc");
+require_once("interfaces.inc");
+/**
+ * Get the NAS-Identifier
+ *
+ * We will use our local hostname to make up the nas_id
+ */
+if (!function_exists("getNasID")) {
+function getNasID()
+{
+ global $g;
+
+ $nasId = "";
+ exec("/bin/hostname", $nasId);
+ if(!$nasId[0])
+ $nasId[0] = "{$g['product_name']}";
+ return $nasId[0];
+}
+}
+
+/**
+ * Get the NAS-IP-Address based on the current wan address
+ *
+ * Use functions in interfaces.inc to find this out
+ *
+ */
+if (!function_exists("getNasIP")) {
+function getNasIP()
+{
+ $nasIp = get_interface_ip();
+ if(!$nasIp)
+ $nasIp = "0.0.0.0";
+ return $nasIp;
+}
+}
/* setup syslog logging */
openlog("openvpn", LOG_ODELAY, LOG_AUTH);
OpenPOWER on IntegriCloud