rlm_sql variable substitution clarification

Guy Fraser guy at incentre.net
Fri Jul 7 19:57:53 CEST 2006


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.





More information about the Freeradius-Users mailing list