Re: rlm_expr question

2004-06-16 Thread Alan DeKok
nsinit [EMAIL PROTECTED] wrote:
   You have to put the Value in back-quotes: `%{expr: %{Call-Refrence}`

   I have tried it, but it didn't work.

  Then you're probably not using 1.0.0-pre*

  Alan DeKok.

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


rlm_expr question

2004-06-15 Thread nsinit

Can i return the same VALUE_PAIR in the access-accept packet as the access-request 
packet?
For example, Call-Refrence = 2 in access-request packet, and then return 
Call-Refrence = 2 in the access-accept packet.  I am using the rlm_expr, but failed.

(freeradius0.9.2 + rlm_pap + rlm_expr + rlm_sql_mysql + rlm_sqlcounter)

1.
[EMAIL PROTECTED] main]# ./radauth ylei ylei
Sending Access-Request of id 239 to 10.1.16.250:1812
User-Name = ylei
User-Password = ylei
NAS-IP-Address = 127.0.0.1
Call-Refrence = 2   -- our own Attribute
NAS-Port = 6
rad_recv: Access-Accept packet from host 10.1.16.250:1812 id=239,length=62
Reply-Message = 2
Call-Refrence-Ack = %{expr: %{Call-Refrence}} -- our own Attribute
Session-Timeout = 6000


2. dictionary file

VENDOR  SZHTP   
ATTRIBUTE   Call-Refrence   0   Integer VENDOR
ATTRIBUTE   Call-Refrence-Ack   1   String  VENDOR  // 
String: same as Reply-Message
..


refering to /usr/local/share/freeradius/dictionary:

ATTRIBUTE   Reply-Message   18  String  



3. radreply table:
id  UserNameAttribute   op  Value
1   yleiReply-Message   :=  %{expr: 
%{Call-Refrence}}
2   yleiCall-Refrence-Ack   :=  %{expr: 
%{Call-Refrence}}   
3   yleiCall-Refrence   :=  %{expr: 
%{Call-Refrence}}

Can anyone tell me why i cann't get what i want?

PS:
WHERE is the function expr_xlat() in rlm_expr.c called?? I will debug for the 
above if i konw.



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


Re: rlm_expr question

2004-06-15 Thread Alan DeKok
nsinit [EMAIL PROTECTED] wrote:
 3. radreply table:
 idUserNameAttribute   op  Value
 1 yleiReply-Message   :=  %{expr: 
 %{Call-Refrence}}

  You have to put the Value in back-quotes: `%{expr: %{Call-Refrence}`

  Alan DeKok.

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


Re: Re: rlm_expr question

2004-06-15 Thread nsinit
Hi





  You have to put the Value in back-quotes: `%{expr: %{Call-Refrence}`


I have tried it, but it didn't work.

1. radreply table:
id  UserNameAttribute   op  Value
1   yleiReply-Message   :=  `%{expr: 
%{Call-Refrence}}` -- back-quotes
2   yleiCall-Refrence-Ack   :=  `%{expr: 
%{Call-Refrence}}` 
3   yleiCall-Refrence   :=  `%{expr: 
%{Call-Refrence}}`

2.
[EMAIL PROTECTED] main]# ./radauth ylei ylei
Sending Access-Request of id 239 to 10.1.16.250:1812
User-Name = ylei
User-Password = ylei
NAS-IP-Address = 127.0.0.1
Call-Refrence = 2
NAS-Port = 6
rad_recv: Access-Accept packet from host 10.1.16.250:1812 id=239,length=62
Reply-Message = `2`   -- back-quotes
Call-Refrence-Ack = `%{expr: %{Call-Refrence}}`   -- back-quotes
Session-Timeout = 6000

I don't understand why Reply-Message works well but Call-Refrence-AckCall-Refrence 
doesn't work at all.

PS:
WHERE is the function expr_xlat() in rlm_expr.c called?? I will debug for the 
above if i konw.






Hello World! 

[EMAIL PROTECTED]
2004-06-16




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