master branch radius_xlat() expected behavior?
Aaron Hurt
ahurt at ena.com
Sat Jul 13 02:05:02 CEST 2013
On Jul 12, 2013, at 6:16 PM, Arran Cudbard-Bell <a.cudbardb at freeradius.org> wrote:
>
> On 12 Jul 2013, at 23:34, Aaron Hurt <ahurt at ena.com> wrote:
>
>> I have the following code in the accounting function of my rlm_couchbase module:
>>
>> radius_xlat(key, sizeof(key), request, inst->key, NULL, NULL)
>>
>> inst->key is set in the config to the following:
>>
>> key = "radacct_%{%{Acct-Unique-Session-Id}:-%{Acct-Session-Id}}"
>>
>> I have the acct_unique policy loaded in the preacct section of the config but it isn't finding it in that expansion.
>> This is what I see in radiusd -X
>>
>> (8) # Executing section preacct from file /usr/local/etc/raddb/sites-enabled/ena
>> (8) group preacct {
>> (8) - entering group preacct {...}
>> (8) [preprocess] = ok
>> (8) policy acct_unique {
>> (8) - entering policy acct_unique {...}
>> (8) ? if ("%{string:Class}" =~ /ai:([0-9a-f]{32})/i)
>> (8) expand: "%{string:Class}" -> 'I\314\005\263\000\000\0017\000\001\002\000\254\033\002\003\000\000\000\000\000\000\000\000\000\000\000\000\001\316t\0250\303G\204\000\000\000\000\000\001\237\365'
>> (8) ? if ("%{string:Class}" =~ /ai:([0-9a-f]{32})/i) -> FALSE
>> (8) else else {
>> (8) - entering else else {...}
>> (8) update request {
>> (8) expand: "%{md5:%{User-Name},%{Acct-Session-ID},%{NAS-IP-Address},%{NAS-Identifier},%{NAS-Port-ID},%{NAS-Port}}" -> '1ed32dfe64d37d100c15550f2e7c55c7'
>> (8) Acct-Unique-Session-Id := "1ed32dfe64d37d100c15550f2e7c55c7"
>> (8) } # update request = ok
>> (8) - else else returns ok
>> (8) - policy acct_unique returns ok
>> (8) [couchbase] = ok
>> (8) # Executing section accounting from file /usr/local/etc/raddb/sites-enabled/ena
>> (8) group accounting {
>> (8) - entering group accounting {...}
>> rlm_couchbase (couchbase): Reserved connection (4)
>> (8) couchbase : expand: "radacct_%{%{Acct-Unique-Session-Id}:-%{Acct-Session-Id}}" -> 'radacct_51D241BE-00000565'
>
> No the behaviour isn't correct. It was broken by 4b9be42a2f1b45e97ee12de0d412a4f65c750074.
>
> Arran Cudbard-Bell <a.cudbardb at freeradius.org>
> FreeRADIUS Development Team
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/devel.html
Okay, Thank you.
-- Aaron
More information about the Freeradius-Devel
mailing list