Help Unlang Freeradius 2.x to 3.x

Alan DeKok aland at deployingradius.com
Thu Jul 2 12:26:34 CEST 2020


On Jul 2, 2020, at 4:09 AM, Olivier CALVANO <o.calvano at gmail.com> wrote:
> I will reformulate my question more clearly and put debug.

  ALL of the debug.

  http://wiki.freeradius.org/list-help

> It's just this condition that seems to have changed, before I wrote it like
> this in version 2; x and it worked:

  There is no need to say the same thing 

> in version 3, I write it like this:
> 
> if ((&Tunnel-Server-Endpoint != 192.168.1.1') && (User-Name =~ /\\.local/)
> && (User-Name !~ /network\\.local/) && ("%{Packet-Src-IP-Address}" ==
> "172.16.100.100")) {

  Don't use two \\ in the regular expression.  You only need one.

  I also suggested you change how you use Packet-Src-IP-Address.  Why are you not doing that?

> and he gives me a mistake
> (0)     policy Rewrite_FORWARDER {
> (0)       if ((&Tunnel-Server-Endpoint != '192.168.1.1') && (User-Name =~
> /\\.local/) && (User-Name !~ /network\\.local/) &&
> ("%{Packet-Src-IP-Address}" == "172.16.100.100")) {
> (0)       ERROR: Failed retrieving values required to evaluate condition

  Which means that one of the attributes in the condition doesn't exist.

  i.e. it's not in the Access-Request packet.

  What's in the Access-Request packet?  We don't know.  Because you didn't post that.  Even though ALL of the the documentation says to post it.\

> so I can't find the right syntax for it to look at the
> Tunnel-Server-Endpoint attribute

  No.  That isn't the problem.

> or maybe it would mark this error because the Tunnel-Server-Endpoint
> attribute is not present in the request?

  If you READ the debug output as suggested in ALL of the documentation, you could answer this question for yourself.

  Right now, you're not making progress.  You're just posting the same thing over and over.  This is not helpful.

  Follow the documentation.  Follow instructions.  It *will* fix the problem.  Or, you can post the same message every day for the next year, and make zero progress.

  Alan DeKok.




More information about the Freeradius-Users mailing list