diff options
Diffstat (limited to 'src/etc/inc/radius.inc')
-rw-r--r-- | src/etc/inc/radius.inc | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/etc/inc/radius.inc b/src/etc/inc/radius.inc index 326b359..3a871c1 100644 --- a/src/etc/inc/radius.inc +++ b/src/etc/inc/radius.inc @@ -303,12 +303,26 @@ class Auth_RADIUS extends PEAR { $this->putAttribute(RADIUS_NAS_IP_ADDRESS, $ipaddr, "addr"); // Add support for sending NAS-Identifier - if (empty($config["captiveportal"][$cpzone]["radiusnasid"])) { + if (function_exists("getNasID")) { + $nasId = getNasID(); + } else if (empty($config["captiveportal"][$cpzone]["radiusnasid"])) { $nasId = php_uname("n"); } else { $nasId = $config["captiveportal"][$cpzone]["radiusnasid"]; } $this->putAttribute(RADIUS_NAS_IDENTIFIER, $nasId); + + if (function_exists("getNasPortType")) { + $this->putAttribute(RADIUS_NAS_PORT_TYPE, getNasPortType()); + } + + if (function_exists("getNasPort")) { + $this->putAttribute(RADIUS_NAS_PORT, getNasPort(), 'integer'); + } + + if (function_exists("getCalledStationId")) { + $this->putAttribute(RADIUS_CALLED_STATION_ID, getCalledStationId()); + } } /** |