master branch radius_xlat() expected behavior?

Aaron Hurt ahurt at ena.com
Sat Jul 13 00:34:09 CEST 2013


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'

Is this the expected behavior?  If so, what am I doing wrong?

Thank You,

Aaron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20130712/10eb0778/attachment.html>


More information about the Freeradius-Devel mailing list