Alan DeKok wrote:
> Turtiainen Tero" <[EMAIL PROTECTED]> wrote:
> > Which part of that entry does not work?
>
> NAS-Port is NOT a configuration item.
Does it matter which attribute is used? I have tried adding my own
attributes to a dictionary as suggested by the link in my previous mail
and those attributes failed too.
> The problem has nothing to do with rlm_expr. You CANNOT add a
> RADIUS attribute to a request from the 'users' file, which is what
> you were trying to do.
Then I guess the attribute does not matter...
So is it true that something like:
DEFAULT Some-Valid-Attribute := 42
Fall-Through = Yes
cannot be done, unless the attribute is one of those special attributes
like Auth-Type?
> > I was expecting expr to work also on check items. I just haven't
> > managed to get it working.
>
> Try:
>
> DEFAULT NAS-Port == `%{rlm_expr: 1 + 2}`
> Reply-Message = "Nas port of 3",
> Fall-Through = 1
>
> Send it packets containin NAS-Port of 1, 2, 3, 4, ... and see what
> happens.
I won't, it is quite obvious what happens in this case :)
> > I don't get it. At the top you seem to imply that rlm_expr can be
> > used with config items but now you are saying that it doesn't work
> > that way. I am obviously confused and missing something obvious.
>
> As I said before, rlm_expr works, but your attempt to *set* the
> value of NAS-Port is wrong.
Then I don't understand how the following users-file line in the link mentioned
earlier is supposed to work:
DEFAULT NAS-IP-Address == 1.2.3.4, ATM-VCI := `%{expr:%{NAS-Port} & 65535}`,
ATM-VPI := `%{expr:%{NAS-Port} / 65536}`
I understood that in this case two new check items are set with the
values provided by the expression.
--
<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=->
< Tero Turtiainen | Yes Sir, may I lick your boots or do your Highness >
< [EMAIL PROTECTED] | use dry cleaning? - Stone >
<-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=->
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html