So is anyone know how to do the following in the FreeRadius 1.1.7 ?

if(control:Calling-Station-Id == ""){
        reject
    }


I just want to reject the packet if the Control (or maybe check) is empty or has no value. I could not afford to upgrade at this time as it's a native freeradius comes with SLES 10 and i'm not sure how to compile the new radius there.

Thanks
Danny
On Thu, Mar 14, 2013 at 6:53 PM, Danny Kurniawan <danny.kurniawan@fairchildsemi.com> wrote:
Just to add in,

I have tested and i know it works to compare it by enabled the checkval inside radius.conf

But now how can i check if the value of the CallingStationID is not empty? In Radius 2.x i can use the unlang below, but in Radius 1.x it's failed when i tried that.

Also i have enabled
notfound-reject = yes

in the checkval function, but i believe that only check the item-name and not the check-name.

Is there any way to do this from radius 1.x? I just in the position cant upgrade the radius at this time.

Thanks
Danny

On Thu, Mar 14, 2013 at 6:39 PM, Danny Kurniawan <danny.kurniawan@fairchildsemi.com> wrote:
Hi All,

All of the suggestion works fine :)

So just wondering, will this unlang method works for radius 1.x version? If its not working, what is the method that i can use in that version?

Thanks
Danny

On Thu, Mar 14, 2013 at 2:58 PM, Fajar A. Nugraha <list@fajar.net> wrote:
On Thu, Mar 14, 2013 at 5:28 PM, Danny Kurniawan <danny.kurniawan@fairchildsemi.com> wrote:
Thanks a lot for your reply.

Yes i got it working. However one more question :

what is the operator used to check if the value is empty ?

if(control:Calling-Station-Id == ""){
        reject
    }

*not working for above


Not sure. Maybe

if( !("%{control:Calling-Station-Id}") ){
   reject
}

-- 
Fajar

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



--
Best Regards,
Danny



--
Best Regards,
Danny



--
Best Regards,
Danny