Error messages in debug on 3.0

2013-10-10 Thread Phil Mayers
I've just ported our config to 3.0 and I'm seeing a few error messages; 
they don't seem to be critical but are concerning me.


Specifically I'm seeing:

ERROR: Conditional evaluation failed due to internal sanity check.

...whenever I try to compare against absent attributes. What's the 
correct syntax for this now - do I need:


if ((Attr)  (Attr op RHS)) {

...or can I ignore the message?


I'm also seeing this with:

if (%{outer.request:Blah})

...if I'm not in a tunnel (in some generic logging policy); what's the 
right syntax for that?

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


Re: Error messages in debug on 3.0

2013-10-10 Thread Phil Mayers

On 10/10/13 18:32, Phil Mayers wrote:

I've just ported our config to 3.0 and I'm seeing a few error messages;
they don't seem to be critical but are concerning me.

Specifically I'm seeing:


We're also getting:

Info: Invalid operator for item Sql-Group: reverting to '=='

...which is logged to radiusd.log. This seems to be spurious - all our 
comparisons to SQL-Group are, of course using ==.


Other than that, it all seems OK!
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: Error messages in debug on 3.0

2013-10-10 Thread Arran Cudbard-Bell




 On 10 Oct 2013, at 18:32, Phil Mayers p.may...@imperial.ac.uk wrote:
 
 I've just ported our config to 3.0 and I'm seeing a few error messages; they 
 don't seem to be critical but are concerning me.
 
 Specifically I'm seeing:
 
 ERROR: Conditional evaluation failed due to internal sanity check.
 
 ...whenever I try to compare against absent attributes. What's the correct 
 syntax for this now - do I need:
 
 if ((Attr)  (Attr op RHS)) {
 

Yes.

 ...or can I ignore the message?
 
 
 I'm also seeing this with:
 
 if (%{outer.request:Blah})
 
 ...if I'm not in a tunnel (in some generic logging policy); what's the right 
 syntax for that?

possibly if (outer.request 

Sorry about the errors, I think they should be more descriptive in master 
unless Alan changed something when he did the second pass fix up for conditions.

But yes, in general a presence check is now required. It makes it easier to 
spot attributes which should be there but aren't.

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


Re: Error messages in debug on 3.0

2013-10-10 Thread Phil Mayers

On 10/10/13 18:51, Arran Cudbard-Bell wrote:


possibly if (outer.request 


Hmm, no same thing, and worse it's squashing Module-Failure-Message :o(
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html


Re: Error messages in debug on 3.0

2013-10-10 Thread Alan DeKok
Phil Mayers wrote:
 I've just ported our config to 3.0 and I'm seeing a few error messages;
 they don't seem to be critical but are concerning me.
 
 Specifically I'm seeing:
 
 ERROR: Conditional evaluation failed due to internal sanity check.

  That should be fixed.  Either it can be deleted, or reworded.

 ...whenever I try to compare against absent attributes. What's the
 correct syntax for this now - do I need:
 
 if ((Attr)  (Attr op RHS)) {
 
 ...or can I ignore the message?

  Yes.

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


Re: Error messages in debug on 3.0

2013-10-10 Thread Arran Cudbard-Bell

On 10 Oct 2013, at 22:23, Alan DeKok al...@deployingradius.com wrote:

 Phil Mayers wrote:
 I've just ported our config to 3.0 and I'm seeing a few error messages;
 they don't seem to be critical but are concerning me.
 
 Specifically I'm seeing:
 
 ERROR: Conditional evaluation failed due to internal sanity check.
 
  That should be fixed.  Either it can be deleted, or reworded.

I've reworded it. The code in master actually tells you what was wrong, but the 
changes
were quite extensive so it didn't get ported to v3.0.x.

I've also removed the error on accessing a request which doesn't exist, so 
presence checks work as expected.

The actual presence check itself is ok.

In radius_evaluate_tmpl:

case VPT_TYPE_ATTR:
case VPT_TYPE_LIST:
if (radius_vpt_get_vp(request, vpt) != NULL) {
rcode = true;
} else {
rcode = false;
}
break;

Which works for

if (outer.request:Attribute)

and 

if (outer.request)

It's just one of the functions called to convert the enumerated request type to 
an actual REQUEST threw an error when the request didn't exist.

Arran Cudbard-Bell a.cudba...@freeradius.org
FreeRADIUS Development Team

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