rlm_cache xlat
Станислав Семенов
i_am_self at mail.ru
Thu Feb 27 15:36:31 CET 2020
I have not tried this option. But <ERROR: Unknown attribute
"h323-ivr-in=ani:4822360460">
(0) # Executing section post-auth from file
/usr/local/radius/etc/raddb/radiusd.conf
(0) post-auth {
(0) cache_ldap: EXPAND %{User-Name}
(0) cache_ldap: --> E350
(0) cache_ldap: No cache entry found for "E350"
(0) cache_ldap: Creating new cache entry
(0) cache_ldap: &reply:Cisco-AVPair := &reply:Cisco-AVPair ->
'h323-ivr-in=ani:4822360460'
(0) cache_ldap: &control:Tmp-String-0 := &control:Tmp-String-0 ->
'h323-ivr-in=ani:4822360460'
(0) cache_ldap: Committed entry, TTL 300 seconds
(0) [cache_ldap] = updated
(0) update reply {
(0) ERROR: Unknown attribute "h323-ivr-in=ani:4822360460"
(0) EXPAND %{cache_ldap:%{control:Tmp-String-0}}
(0) -->
(0) Tmp-String-1 =
(0) } # update reply = noop
On 27.02.2020 17:09, Alan DeKok wrote:
> On Feb 27, 2020, at 6:31 AM, Станислав Семенов via Freeradius-Users
> <freeradius-users at lists.freeradius.org> wrote:
>> Why not working next config? Thanks.
> The documentation in the mods-available/cache file should be pretty clear.
>
>> cache cache_ldap {
>> driver = "rlm_cache_rbtree"
>> key = "%{User-Name}"
>> ttl = 300
>> add_stats = no
>> update {
>> &reply:Cisco-AVPair := &reply:Cisco-AVPair
>> &control:Tmp-String-0 := &control:Tmp-String-0
>> }
>> }
>>
>> post-auth {
>> cache_ldap
>> update reply {
>> Tmp-String-1 = "%{cache_ldap:control:Tmp-String-0}"
>> }
>> detail_reply
>> }
>>
>> (0) # Executing section post-auth from file
>> /usr/local/radius/etc/raddb/radiusd.conf
>> (0) post-auth {
>> (0) cache_ldap: EXPAND %{User-Name}
>> (0) cache_ldap: --> E350
>> (0) cache_ldap: No cache entry found for "E350"
>> (0) cache_ldap: Creating new cache entry
>> (0) cache_ldap: &reply:Cisco-AVPair := &reply:Cisco-AVPair ->
>> 'h323-ivr-in=ani:4822360460'
>> (0) cache_ldap: &control:Tmp-String-0 := &control:Tmp-String-0 ->
>> 'h323-ivr-in=ani:4822360460'
>> (0) cache_ldap: Committed entry, TTL 300 seconds
>> (0) [cache_ldap] = updated
> That's good.
>
>> (0) update reply {
>> (0) No cache entry found for "control:Tmp-String-0"
> It's looking up the string "control:Tmp-String-0" in the cache. It's
> NOT looking up the value of that attribute.
>
> You will need to use:
>
> update reply {
> Tmp-String-1 = "%{cache_ldap:%{control:Tmp-String-0}}"
> }
> This expands the attribute, and then uses the value of the attribute
> as the key lookup.
>
> Alan DeKok.
>
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
More information about the Freeradius-Users
mailing list