Condition checking by attribute in list with unlang

Vladislav Solovei vladsol2009 at gmail.com
Fri Mar 29 18:57:11 CET 2019


Hm...
radiusd -X said that error is in line 355:
/etc/raddb/sites-enabled/default[355]: Entry is not in "attribute =
value" format
line 355 is:
if (reply:Group == "level1") {
So, i guess, there is something wrong with "reply:Attribute" syntax.

I want to check that "Group" attribute in "reply" is "level1".

пт, 29 бер. 2019 о 19:18 Jorge Pereira <jpereira at freeradius.org> пише:
>
> The syntax is wrong. It should be
>
>    if (........) {
>       update <list> {
>            &avp := value
>       }
>    }
>
> More information about unlang https://freeradius.org/radiusd/man/unlang.html
>
> On Fri, Mar 29, 2019 at 2:06 PM Vladislav Solovei <vladsol2009 at gmail.com> wrote:
> >
> > I am trying to check the "Group" attribute in "reply" list with unlang:
> >
> > update reply {
> >    if (reply:Group == "level1") {
> >        &ERX-Ingress-Policy-Name = "some_policy"
> >    }
> > }
> >
> > But, something is wrong. I am getting an error: "Entry is not in
> > "attribute = value" format""
> > Is it possible to do conditional checks by attribute in a list?
> > -
> > List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html



More information about the Freeradius-Users mailing list