I have run into an issue where we now have different types of NAS servers. I would like to use %{Connect-Info} if available or a string formatted from two attributes like : D%{Ascend-Data-Rate}_X%{Ascend-Xmit-Rate} This is how I tried to do it : ConnectInfo_stop = \ '%{Connect-Info:-D%{Ascend-Data-Rate}_X%{Ascend-Xmit-Rate}}' This is what I get when %{Connect-Info} is not available : "D_X" I haven't seen any examples where two attributes are combined to make one attribute. Thanks
On Fri, 2006-07-07 at 11:02 -0600, Guy Fraser wrote:
I have run into an issue where we now have different types of NAS servers. I would like to use %{Connect-Info} if available or a string formatted from two attributes like :
D%{Ascend-Data-Rate}_X%{Ascend-Xmit-Rate}
This is how I tried to do it :
ConnectInfo_stop = \ '%{Connect-Info:-D%{Ascend-Data-Rate}_X%{Ascend-Xmit-Rate}}'
This is what I get when %{Connect-Info} is not available :
"D_X"
I haven't seen any examples where two attributes are combined to make one attribute.
Thanks
I figured it out when running debug for some other reason, sorry for the stupid question. Reason : X-Ascend-Disconnect-Cause = PPP-Rcv-Terminate-Req X-Ascend-Connect-Progress = LAN-Session-Up X-Ascend-Data-Rate = 26400 X-Ascend-PreSession-Time = 32 X-Ascend-Pre-Input-Octets = 364 X-Ascend-Pre-Output-Octets = 253 X-Ascend-Pre-Input-Packets = 15 X-Ascend-Pre-Output-Packets = 13 X-Ascend-First-Dest = 209.115.142.9 X-Ascend-Xmit-Rate = 26400 X-Ascend-Modem-PortNo = 21 X-Ascend-Modem-SlotNo = 16 X-Ascend-Modem-ShelfNo = 1 The attributes are not named like they were in Cistron dictionaries. They all start with "X-". Thanks anyway.
On Fri, 2006-07-07 at 11:19 -0600, Guy Fraser wrote:
On Fri, 2006-07-07 at 11:02 -0600, Guy Fraser wrote:
I have run into an issue where we now have different types of NAS servers. I would like to use %{Connect-Info} if available or a string formatted from two attributes like :
D%{Ascend-Data-Rate}_X%{Ascend-Xmit-Rate}
This is how I tried to do it :
ConnectInfo_stop = \ '%{Connect-Info:-D%{Ascend-Data-Rate}_X%{Ascend-Xmit-Rate}}'
This is what I get when %{Connect-Info} is not available :
"D_X"
I haven't seen any examples where two attributes are combined to make one attribute.
Thanks
I figured it out when running debug for some other reason, sorry for the stupid question.
Reason :
X-Ascend-Disconnect-Cause = PPP-Rcv-Terminate-Req X-Ascend-Connect-Progress = LAN-Session-Up X-Ascend-Data-Rate = 26400 X-Ascend-PreSession-Time = 32 X-Ascend-Pre-Input-Octets = 364 X-Ascend-Pre-Output-Octets = 253 X-Ascend-Pre-Input-Packets = 15 X-Ascend-Pre-Output-Packets = 13 X-Ascend-First-Dest = 209.115.142.9 X-Ascend-Xmit-Rate = 26400 X-Ascend-Modem-PortNo = 21 X-Ascend-Modem-SlotNo = 16 X-Ascend-Modem-ShelfNo = 1
The attributes are not named like they were in Cistron dictionaries. They all start with "X-".
Thanks anyway.
Foiled again :^( I changed it to : ConnectInfo_stop = \ '%{Connect-Info:-D%{X-Ascend-Data-Rate}_X%{X-Ascend-Xmit-Rate}}' Now I get stuff like : "D26400" Help would still be appreciated.
Guy Fraser <guy@incentre.net> wrote:
The attributes are not named like they were in Cistron dictionaries. They all start with "X-".
There's still a bug: Reply-Message = `%{Reply-Message:-x%{User-Password}x}` returns "xbob" for the standard test of user "bob/bob". Patch is given below. Index: src/main/xlat.c =================================================================== RCS file: /source/radiusd/src/main/xlat.c,v retrieving revision 1.72.2.7.2.1 diff -u -r1.72.2.7.2.1 xlat.c --- src/main/xlat.c 8 Dec 2005 12:47:56 -0000 1.72.2.7.2.1 +++ src/main/xlat.c 7 Jul 2006 18:24:08 -0000 @@ -533,7 +533,7 @@ * useless if we found what we need */ if (found) { - while((*p != '\0') && (openbraces > 0)) { + while((*p != '\0') && (openbraces > *open)) { /* * Handle escapes outside of the loop. */ Alan DeKok.
On Fri, 2006-07-07 at 14:18 -0400, Alan DeKok wrote:
Guy Fraser <guy@incentre.net> wrote:
The attributes are not named like they were in Cistron dictionaries. They all start with "X-".
There's still a bug:
Reply-Message = `%{Reply-Message:-x%{User-Password}x}`
returns "xbob" for the standard test of user "bob/bob".
Patch is given below.
Index: src/main/xlat.c =================================================================== RCS file: /source/radiusd/src/main/xlat.c,v retrieving revision 1.72.2.7.2.1 diff -u -r1.72.2.7.2.1 xlat.c --- src/main/xlat.c 8 Dec 2005 12:47:56 -0000 1.72.2.7.2.1 +++ src/main/xlat.c 7 Jul 2006 18:24:08 -0000 @@ -533,7 +533,7 @@ * useless if we found what we need */ if (found) { - while((*p != '\0') && (openbraces > 0)) { + while((*p != '\0') && (openbraces > *open)) { /* * Handle escapes outside of the loop. */
Thank you, I'll give it a shot.
participants (2)
-
Alan DeKok -
Guy Fraser