Skip to content

Commit 9087a96

Browse files
authored
Always set the NAS identifier; if not set fall back to the hostname (#28)
* Always set the NAS identifier; if not set fall back to the hostname * Refrain from setting NAS-IP-Address
1 parent aa03381 commit 9087a96

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/Auth/Source/Radius.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,7 @@ protected function login(
157157
$radius->setIncludeMessageAuthenticator();
158158

159159
$httpUtils = new Utils\HTTP();
160-
$radius->setNasIpAddress($_SERVER['SERVER_ADDR'] ?: $httpUtils->getSelfHost());
161-
162-
if ($this->nasIdentifier !== null) {
163-
$radius->setAttribute((string)self::RADIUS_NAS_IDENTIFIER, $this->nasIdentifier);
164-
}
160+
$radius->setAttribute((string)self::RADIUS_NAS_IDENTIFIER, $this->nasIdentifier ?: $httpUtils->getSelfHost());
165161

166162
if ($this->realm !== null) {
167163
$radius->setRadiusSuffix('@' . $this->realm);

0 commit comments

Comments
 (0)