ChangeLog for 2.1.6 question: Make rlm_perl keep tags for tagged attributes in more situations
Alexandr Kovalenko
alexandr.kovalenko at gmail.com
Tue Aug 18 14:26:34 CEST 2009
On Thu, Jun 18, 2009 at 11:46 AM, Alexandr
Kovalenko<alexandr.kovalenko at gmail.com> wrote:
> On Thu, Jun 18, 2009 at 11:36 AM, Alan DeKok<aland at deployingradius.com> wrote:
>> Alexandr Kovalenko wrote:
>>> Hello,
>>>
>>> I've read ChangeLog for FreeRADIUS 2.1.6 and found there:
>>>
>>> # Make rlm_perl keep tags for tagged attributes in more situations
>>>
>>> Could anyone please point me to exact commits/diffs so I can see if
>>> this will fix my issue with tagged attributes, which I experienced -
>>> tagged attributes ERX-Service-Activate,
>>> ERX-Service-Statistics and similar were sent back to NAS without tags.
>>
>> $ git log src/modules/rlm_perl
>>
>> Shows this:
>>
>> commit 088f7e697913fd9f4de3877927300c1d222e76be
>> Author: Alan T. DeKok <aland at freeradius.org>
>> Date: Wed Apr 22 14:42:13 2009 +0200
>>
>> Don't lose tags
>>
>>
>> And github shows:
>>
>> http://github.com/alandekok/freeradius-server/commit/088f7e697913fd9f4de3877927300c1d222e76be
>>
>> Alan DeKok.
>
> Thank you very much, I will test if this fixes my case and report :)
Fixes commited does not help in my case. I still getting tags lost:
Following code is used in sub authorize {} in perl module I'm trying to use
--------
if (($RAD_REQUEST{'User-Name'} eq 'admin') and
($RAD_REQUEST{'User-Password'} eq 'test')) {
$RAD_REPLY{'ERX-Service-Activate:1'} = "telesys";
$RAD_REPLY{'ERX-Service-Statistics:1'} = "time-volume";
$RAD_REPLY{'ERX-Qos-Parameters'}[0] = "internet_tr_value 2097152";
$RAD_REPLY{'ERX-Qos-Parameters'}[1] = "internet_tr_value_in 2097152";
$RAD_REPLY{'ERX-Service-Activate:2'} = "deny";
$RAD_REPLY{'ERX-Qos-Profile-Name'} = "SP_Tele_Internet";
$RAD_REPLY{'Framed-IP-Address'} = '10.0.112.2';
$RAD_REPLY{'Framed-IP-Netmask'}= "255.255.255.255";
$RAD_REPLY{'ERX-Primary-DNS'} = "1.2.3.4";
$RAD_REPLY{'ERX-Secondary-DNS'} = "1.2.3.5";
return RLM_MODULE_OK;
};
--------
This gives following results:
# radtest admin test 10.3.1.252 12 huawei
Sending Access-Request of id 70 to 10.3.1.252 port 1812
User-Name = "admin"
User-Password = "test"
NAS-IP-Address = 10.1.2.13
NAS-Port = 12
rad_recv: Access-Accept packet from host 10.3.1.252 port 1812, id=70, length=188
ERX-Qos-Parameters = "internet_tr_value 2097152"
ERX-Qos-Parameters = "internet_tr_value_in 2097152"
ERX-Service-Activate:0 = "deny"
ERX-Service-Activate:0 = "telesys"
ERX-Qos-Profile-Name = "SP_Tele_Internet"
ERX-Service-Statistics:1 = time-volume
ERX-Primary-Dns = 1.2.3.4
ERX-Secondary-Dns = 1.2.3.5
Framed-IP-Address = 10.0.112.2
Framed-IP-Netmask = 255.255.255.255
--------
Output from radiusd -X:
rad_recv: Access-Request packet from host 10.3.1.252 port 52845,
id=70, length=57
User-Name = "admin"
User-Password = "test"
NAS-IP-Address = 10.1.2.13
NAS-Port = 12
server radoss {
+- entering group authorize {...}
++[preprocess] returns ok
++[control] returns ok
rlm_perl: $VAR1 = {};
rlm_perl: defined
rlm_perl: Added pair User-Name = admin
rlm_perl: Added pair User-Password = test
rlm_perl: Added pair NAS-Port = 12
rlm_perl: Added pair NAS-IP-Address = 10.1.2.13
rlm_perl: Added pair ERX-Qos-Profile-Name = SP_Tele_Internet
rlm_perl: Added pair ERX-Service-Activate:2 = deny
rlm_perl: Added pair ERX-Qos-Parameters = internet_tr_value 2097152
rlm_perl: Added pair ERX-Qos-Parameters = internet_tr_value_in 2097152
rlm_perl: Added pair ERX-Service-Statistics:1 = time-volume
rlm_perl: Added pair ERX-Secondary-DNS = 1.2.3.5
rlm_perl: Added pair Framed-IP-Address = 10.0.112.2
rlm_perl: Added pair Framed-IP-Netmask = 255.255.255.255
rlm_perl: Added pair ERX-Service-Activate:1 = telesys
rlm_perl: Added pair ERX-Primary-DNS = 1.2.3.4
rlm_perl: Added pair Auth-Type = Perl
++[perl] returns ok
Found Auth-Type = Perl
+- entering group Perl {...}
rlm_perl: Added pair User-Name = admin
rlm_perl: Added pair User-Password = test
rlm_perl: Added pair NAS-IP-Address = 10.1.2.13
rlm_perl: Added pair NAS-Port = 12
rlm_perl: Added pair ERX-Qos-Parameters = internet_tr_value 2097152
rlm_perl: Added pair ERX-Qos-Parameters = internet_tr_value_in 2097152
rlm_perl: Added pair ERX-Service-Activate = deny
rlm_perl: Added pair ERX-Service-Activate = telesys
rlm_perl: Added pair ERX-Qos-Profile-Name = SP_Tele_Internet
rlm_perl: Added pair ERX-Service-Statistics:1 = time-volume
rlm_perl: Added pair ERX-Primary-Dns = 1.2.3.4
rlm_perl: Added pair ERX-Secondary-Dns = 1.2.3.5
rlm_perl: Added pair Framed-IP-Address = 10.0.112.2
rlm_perl: Added pair Framed-IP-Netmask = 255.255.255.255
rlm_perl: Added pair Auth-Type = Perl
++[perl] returns ok
+- entering group post-auth {...}
++[exec] returns noop
} # server radoss
Sending Access-Accept of id 70 to 10.3.1.252 port 52845
ERX-Qos-Parameters += "internet_tr_value 2097152"
ERX-Qos-Parameters += "internet_tr_value_in 2097152"
ERX-Service-Activate:0 += "deny"
ERX-Service-Activate:0 += "telesys"
ERX-Qos-Profile-Name = "SP_Tele_Internet"
ERX-Service-Statistics:1 = time-volume
ERX-Primary-Dns = 1.2.3.4
ERX-Secondary-Dns = 1.2.3.5
Framed-IP-Address = 10.0.112.2
Framed-IP-Netmask = 255.255.255.255
Finished request 0.
Going to the next request
Waking up in 4.9 seconds.
Cleaning up request 0 ID 70 with timestamp +4
Ready to process requests.
--
Alexandr Kovalenko
http://uafug.org.ua/
More information about the Freeradius-Devel
mailing list