Removing an attribute from reply message!
Hi, I want to remove an attribute from reply message(account accept), how can I should do that? more detail: I'm using some sqlcounter to count daily, weekly and monthly octets. After their processing they add Session-Octets-Limit to my reply message. I want to have a condition that if this value reach some special value (for example 20000Byte), then it removes Session-Octets-Limit from reply message. I add this lines at the end of authorize section: if("%{reply.Session-Octets-Limit}" >= 20000) { update reply { Session-Octets-Limit [I don't know what!] } } Is it correct? I don't know! am I should add a module or filter or else? BTW how can I remove Session-Octets-Limit from reply message! Is it possible? Thanks. Hamid Reza Hasani ------------------ Ya Ali
Hamid Reza Hasani <hr.hasani@gmail.com> wrote:
[snipped]
I add this lines at the end of authorize section: if("%{reply.Session-Octets-Limit}" >= 20000) { update reply { Session-Octets-Limit [I don't know what!....and am too lazy to read the docs or look through the mailing list archives so asked the lazyweb instead] } }
*sigh* http://freeradius.org/radiusd/man/unlang.html#lbAH What you are looking for is: ---- Session-Octets-Limit !* ANY ---- Although...this only was fixed in 2.1.8...you will see the workaround for eariler version is: ---- Session-Octets-Limit -= "'%{reply:Session-Octets-Limit}" ---- Cheers -- Alexander Clouter .sigmonster says: Poverty begins at home.
Hi, Thanks for your answer, but there is a bit problem. I'm using 2.1.6 and so I did your first solution, but radiusd can't run and reports this error: /etc/raddb/sites-enabled/default[219]: Parse error after "Session-Octets-Limit" Error reading /etc/raddb/radius.conf I wrote this code in authorize section: if("%{reply.Session-Octets-Limit}" >= 20000) { update reply { Session-Octets-Limit !* ANY } } BTW is your second solution removed value of Session-Octets-Limit or removed it completely? thanks again Hamid Reza Hasani -------- Ya Ali On Wed, Jan 20, 2010 at 8:53 PM, Alexander Clouter <alex@digriz.org.uk>wrote:
Hamid Reza Hasani <hr.hasani@gmail.com> wrote:
[snipped]
I add this lines at the end of authorize section: if("%{reply.Session-Octets-Limit}" >= 20000) { update reply { Session-Octets-Limit [I don't know what!....and am too lazy to read the docs or look through the mailing list archives so asked the lazyweb instead] } }
*sigh*
http://freeradius.org/radiusd/man/unlang.html#lbAH
What you are looking for is: ---- Session-Octets-Limit !* ANY ----
Although...this only was fixed in 2.1.8...you will see the workaround for eariler version is: ---- Session-Octets-Limit -= "'%{reply:Session-Octets-Limit}" ----
Cheers
-- Alexander Clouter .sigmonster says: Poverty begins at home.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Hi, I want to remove an attribute from reply message(account accept), how can I should do that? more detail: I'm using some sqlcounter to count daily, weekly and monthly octets. After their processing they add Session-Octets-Limit to my reply message. I want to have a condition that if this value reach some special value (for example 20000Byte), then it removes Session-Octets-Limit from reply message. I add this lines at the end of authorize section: if("%{reply.Session-Octets-Limit}" >= 20000) { update reply { Session-Octets-Limit [I don't know what!] } } Is it correct? I don't know! am I should add a module or filter or else? BTW how can I remove Session-Octets-Limit from reply message! Is it possible? Thanks. Hamid Reza Hasani ------------------ Ya Ali
participants (2)
-
Alexander Clouter -
Hamid Reza Hasani