type of lvalue in VALUE_PAIR

Jonathan De Graeve Jonathan.De.Graeve at imelda.be
Mon Feb 27 23:50:00 CET 2006


> -----Oorspronkelijk bericht-----
> Van: freeradius-users-
> bounces+jonathan.de.graeve=imelda.be at lists.freeradius.org
> [mailto:freeradius-users-
> bounces+jonathan.de.graeve=imelda.be at lists.freeradius.org] Namens Alan
> DeKok
> Verzonden: maandag 27 februari 2006 23:17
> Aan: edvin.seferovic at kolp.at; FreeRadius users mailing list
> Onderwerp: Re: type of lvalue in VALUE_PAIR
> 
> "Seferovic Edvin" <edvin.seferovic at kolp.at> wrote:
> > Okay - but I suppose I will have to patch my NAS ( Poptop server )
to
> use
> > Acct-Input-GigaWords and Output- instead of Octets. Still if I patch
my
> NAS
> > to send GigaWords.. when I use sqlcounter to count the MBs I will
still
> not
> > be able to compare the check-name which is written into uint32
variable.
> > Shouldn't this be patched too ( I am not a professional programmer -
so
> > excuse my "silly" question ).
> 
>   Yes, but that doesn't have much to do with RADIUS attributes.
> 
>   If your NAS doesn't send the Gigawords attributes, then why are you
> worried about people using more than 4G of traffic?  Your NAS will
> never tell the server that the user had more than 4G of traffic.
> 
The nice thingy about this is that most nasses just wrap around 2GB
(2^31, signed int instead of 2^32,unsigned int)

> > Poptop server accepts Session-Octets-Limit for the traffic limit (
> actually
> > it is ppp that is doing the limiting ). So Ive added this attribute
to
> my
> > dictionary. PPP also needs Octets-Direction so it can know which
traffic
> > flow to count. Ive added both attributes and it is working ( for
2^32 ).
> 
>   Ah, Ok.
> 
> > Can you give me some directives how to implement this. Maybe to
extend
> the
> > config of sqlcounter and value_pair struct?
> 
>   I don't see how that will help if your NAS doesn't send the Gigaword
> attributes.
> 
>   If it does send them, then yes, you'll have to update the sqlcounter
> module to handle 64-bit numbers.  But you don't need to update any of
> the valuepair structures.

You could do it by using a multiplicator, say using kbytes/mbytes
instead of bits/bytes. That will save you the 64-bit numbering within
sqlcounter.

SQL can handle this with the builtin calculation functions

J.





More information about the Freeradius-Users mailing list