2011-11-07 - Re: [GRASE-Hotspot] 4 questions/problems

Header Data

From: Tim White <ti***8@gmail.com>
Message Hash: 14d9ad284990d3e4badd46d2e41c961ef7180457d6f2062b4ca5728064a7baff
Message ID: <4EB88619.5040406@gmail.com>
Reply To: <1320662361.72995.YahooMailNeo@web161405.mail.bf1.yahoo.com>
UTC Datetime: 2011-11-07 18:30:01 UTC
Raw Date: Tue, 08 Nov 2011 11:30:01 +1000

Raw message

Hi Tim.

Seems I didn't respond to your previous email. Sorry. It's currently 
exam time and it seems to have gotten lost in my inbox.

On 07/11/11 20:39, tim storey wrote:
> Hi all,
>
> I have 4 questions/problems:
>
> 1) Ticket size
> The mini screen displays the remaining bandwidth balance as at the 
> first of the month.
> How can I change this to show the total issued instead?
Currently I'm redoing the status/login javascript. Once that's done I 
hope to make it clearer what a user has been allocated.
>
> 2) 5 Gb tickets
> All 5 Gb tickets are shown as being 4 Gb in size on the mini screen. 
> (The status and admin screens reflect the size correctly!)
> How do I fix this?
This sounds like a 32bit integer issue. Javascript is supposed to be 
64bit by default, so it must be somewhere else. Can you open a bug for 
it (trac.grasehotspot.org) so I remember to look at it after exams?

> 3) Host resources
> I have Grase sitting in a VirtualBox VM with a WAN IP of 192.168.1.3, 
> the machine hosting the VM has an IP of 192.168.1.2 and the ADSL 
> router is 192.168.1.1.
> I have several php apps (behind apache) on the host (192.168.1.2) 
> which I wish to make freely available over my network, but in order to 
> access them I have to perform a login via Grase.
> I have added 192.168.1.2 to walled garden allowed hosts, but that does 
> not fix my problem.
> How do I fix this?
Can you show me the contents of /etc/chilli/local.conf ?
Testing that here it all seems to be working fine. The important line 
will be something like
uamallowed=192.168.1.2
Just make sure you are running the latest chilli in the repository, as 
earlier ones didn't read the settings properly.

>
> 4) Curious problem
> As mentioned in point 2 above, I have issued tickets of 5 Gb size.
> One of my customers experienced a weird problem with his 5 Gb ticket, 
> namely: when he reached the 4 Gb usage mark Grase/radius logged him 
> out and presented him with the "you have reached your b/w limit" 
> message on successive attempts to login. He purchased another 5 Gb 
> ticket from me and the exact same thing occurred when that ticket 
> reached 4 Gb. He then logged in successfully with the first ticket and 
> was able to use it again. The second ticket however steadfastly 
> refuses to allow him back in. (I replaced it with a fresh 1 Gb ticket 
> to solve the problem swiftly.)
> I have other 5 Gb customers who have used up their tickets without any 
> such error.
> Any ideas how to solve this?
I'm guessing it must have something to do with using the whole amount in 
one go? Again, it sounds like a 32bit integer error.
Can you do a test (I don't have a 32bit test machine setup atm) by 
downloading (just do it from your local server) 5Gb in one go, and try 
doing it in parts. It may also be possible that the other 5Gb tickets 
are being used over the month marker (i.e. the 1st of the month) which 
IIRC is when the radacct data is archived, so the ticket limit is 
actually below the 4Gb mark when they approach the limit. (It moves all 
the acct data to a monthly total table, then decrements the limit so we 
only have to lookup this current months usage to see if they have 
reached their limit).

Hope that helps.

Tim

Thread