Premature end of paircompare when using !* op on non-present attribute
Enrik Berkhan
enrik#freeradius at planb.de
Fri Feb 17 11:17:16 CET 2006
Hi all,
yesterday I've noticed the following when using the '!*' op
(T_OP_CMP_FALSE) in the check items. When the attribute to be compared
is not found in the list of request attributes, '!*' evaluates to true,
which is correct, but further processing of the remaining check items
will be skipped. The code responsible for this behaviour comes from
paircompare() in src/main/valuepair.c:
> /*
> * Not found, it's not a match.
> */
> if (auth_item == NULL) {
> /*
> * Didn't find it. If we were *trying*
> * to not find it, then we succeeded.
> */
> if (check_item->operator == T_OP_CMP_FALSE)
> return 0;
> else
> return -1;
> }
I believe the `return 0' to be incorrect. I think it should be
`continue' instead to evaluate the remaining check items. Or is it
correct like it is?
Enrik
More information about the Freeradius-Devel
mailing list