Problem with unlang and customized reply message

Alan DeKok aland at deployingradius.com
Fri Jun 20 04:05:31 CEST 2014


Lorenzo Milesi wrote:
> This is the dailycounter config:

  To be clear: it's not the configuration of the "dailycounter" module.

>     dailycounter{
>         reject = 1

  That works.

>     }
>     if(reject){
>         update reply {
>             Reply-Message := "You have reached your daily time limit"
>         }
>         ok = reject

  That doesn't work.  You can't just put "ok = reject" into an "if"
section.  It won't work.

  Instead, just do:

    if(reject){
        update reply {
            Reply-Message := "You have reached your daily time limit"
        }
        reject
    }


  That should work.

>     }
> 
> For other checks the same code seems to work fine... What's wrong with this?

  It's not following the format as documented in "man unlang".

> thanks
> 
> [1] http://grasehotspot.org/documentation/freeradius/meaningful-reply-message-for-access-reject/
> [2] http://tim.purewhite.id.au/2011/04/coova-chilli-freeradius-reply-message/

  Those pages are wrong.

  Alan DeKok.


More information about the Freeradius-Users mailing list