Adding reply attributes when proxy

mikoi mika.koivisto at
Thu Aug 13 14:08:32 CEST 2009

I don´t think it is because of the attribute filters since the backend token
server is not replying with attributes. I want them added in post-proxy
section in FreeRadius.
So i tried the following in the post-proxy {

if (proxy-reply:Access-Accept) {
update proxy-reply {
Class := "%{sql:SELECT Value FROM radreply WHERE username ='%{User-Name}'
AND attribute = 'Class'}"
State := "%{sql:SELECT Value FROM radreply WHERE username ='%{User-Name}'
AND attribute = 'State'}"

The above seems to work but if one of the attributes are missing from the
user it still will send State 0x. 
And if it is Access-Reject in stead of Access-Accept it will still send out
State attribute and Reply-Message= failed authentication..

I´m not very good in scripting so if someone would be kind to add a bit of
unlang or if/then to complete it i would appreciate it.
And there might be new attributes added later on so this really would need
to be more flexible. Thanks in advance.

>check what you are allowing via the proxy - check your attribute filters


View this message in context:
Sent from the FreeRadius - User mailing list archive at

More information about the Freeradius-Users mailing list