Update Noop In Authorize Section
Hi, I am trying to reject user by checking session time from radacct. I am using 4 SQL query and checking various things in debug mode every SQL query looking good but the only issue updates control noop. Debug mode shows update control noop. Below is my SQL queries. /default authorize section ============================================================= update control { Tmp-String-1 := "%{sql:=============================='}" Tmp-String-2 := "%{sql:================================}" Tmp-String-3 := "%{sql:=================================}'}" Tmp-String-3 := "%{expr:%{control:Tmp-String-3} * 3600}" Tmp-String-4 := "%{sql:S=================================='}" } if(%{control:Tmp-String-4} >= 1){ if(%{control:Tmp-String-2} >= %{control:Tmp-String-3}){ update reply { Reply-Message := 'Reached Session Limit' } reject } } All SQL query working fine and showing exact value. The only problem is that update control showing noop. Some reason update control is not working. Thank you very much
On May 9, 2019, at 4:48 PM, One Zero Art <onezeroartapps@gmail.com> wrote:
All SQL query working fine and showing exact value. The only problem is that update control showing noop.
Yes, that's the way it works. There are many reasons why, unfortunately. Why does this matter? The configuration you posted will work. Alan DeKok.
Hi Alan, Thank you for your reply. Problem is the last if statement is not working, it's not rejecting. if(%{control:Tmp-String-4} >= 1){ if(%{control:Tmp-String-2} >= %{control:Tmp-String-3}){ update reply { Reply-Message := 'Reached Session Limit' } reject } } In debug mode, I can see the value of %{control:Tmp-String-4} is 1. Can please tell me why its if statement is not working. Thank you On Fri, May 10, 2019, 3:08 AM Alan DeKok <aland@deployingradius.com> wrote:
On May 9, 2019, at 4:48 PM, One Zero Art <onezeroartapps@gmail.com> wrote:
All SQL query working fine and showing exact value. The only problem is that update control showing noop.
Yes, that's the way it works. There are many reasons why, unfortunately.
Why does this matter? The configuration you posted will work.
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
On May 9, 2019, at 11:04 PM, One Zero Art <onezeroartapps@gmail.com> wrote:
Problem is the last if statement is not working, it's not rejecting.
If only there was some kind of debug output you could post to the list.
Can please tell me why its if statement is not working.
Do you go to a doctor, and say "I'm sick, but I won't tell you what's wrong. You figure it out, and tell me how to get better!" No, you don't. Then don't do the same thing here. ALL of the documentation tells you to post the debug output. Including the email you get when you join the list. Why are you refusing to do that? Alan DeKok.
Hi Alan, Sorry for my stupid question. Actually, the problem was in attribute type, I was comparing string attribute to an integer. Fixed that and It's working fine now. Thank you On Fri, May 10, 2019 at 5:02 PM Alan DeKok <aland@deployingradius.com> wrote:
On May 9, 2019, at 11:04 PM, One Zero Art <onezeroartapps@gmail.com> wrote:
Problem is the last if statement is not working, it's not rejecting.
If only there was some kind of debug output you could post to the list.
Can please tell me why its if statement is not working.
Do you go to a doctor, and say "I'm sick, but I won't tell you what's wrong. You figure it out, and tell me how to get better!"
No, you don't. Then don't do the same thing here.
ALL of the documentation tells you to post the debug output. Including the email you get when you join the list. Why are you refusing to do that?
Alan DeKok.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
participants (2)
-
Alan DeKok -
One Zero Art