On Wednesday 23 March 2005 09:18, Chris Knipe wrote:
> ----- Original Message -----
> From: "Chris Knipe" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Wednesday, March 23, 2005 5:31 AM
> Subject: Re: rlm_perl hash issue
>
> >> "Chris Knipe" <[EMAIL PROTECTED]> wrote:
> >>> So basically:
> >>>         $RAD_REPLY{'Recv-Limit'} = $BytesAvail - $BytesUsed;
> >>>         $RAD_REPLY{'Xmit-Limit'} = $BytesAvail - $BytesUsed;
> >>> doesn't work
> >>>         $RAD_REPLY{'Recv-Limit'} = 23423424;
> >>>         $RAD_REPLY{'Xmit-Limit'} = 23234242;
> >>> works
> >>
> >>  Hmm... that looks like rlm_perl isn't looking in the right place for
> >> the values of the perl variables.  Not that I know anything about
> >> Perl....
> >>
> >>> Strange as well, is that format_bytes successfully completes the
> >>> formating
> >>> and the calculation.  Thus, there is also nothing wrong in my code.
> >>
> >>  Perl keeps values for variables in multiple formats.  If rlm_perl
> >> isn't looking in the right place, that may be the problem.
>
> Just further to this issue...
>
> Works:
> $RAD_REPLY{'Recv-Limit'} = $BytesAvail;
>
> does NOT Work:
> my $tmpBytes = $BytesAvail - $BytesUsed;
> $RAD_REPLY{'Recv-Limit'} = $tmpBytes;
>
> And then the original also obviously does not work.
> $RAD_REPLY{'Recv-Limit'} = $BytesAvail - $BytesUsed;
>
> Thus, it seems it makes it virtually impossible to do any form of
> "calculation" on data to use during authentication with rlm_perl....

Eeeek. There is definitely a bug somewhere :-(

-- 

Peter Nixon
http://www.peternixon.net/
PGP Key: http://www.peternixon.net/public.asc

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

Reply via email to