Page 1 of 1

Quota Throttle with pppoe bug

Posted: Tue Nov 09, 2010 8:03 am
by pbix
Eric,

When using quotas with QoS disabled Gargoyle uses simplified tc classes to throttle bandwidth. These classes are tied to the pppoe-wan device when pppoe is used. Unfortunately, if the pppoe link goes down this device is deleted by pppd which in turn causes the classes associated with it to also get deleted.

When the ppp link comes back up pppd automatically adds back the pppoe-wan device but the simplified classes are not added back by Gargoyle. So after the pppoe link is restored the quota logic is disabled.

I had this same issue with the QoS issues a while back. In that case I changed qos_gargoyle to run from the hotplug event associated with the wan device.

If quotas are instead used with QoS enabled then the normal QoS classes are used and the above issue is avoided. People using pppoe with quotas might want to consider enabling QoS and using those classes to work around this issue until it is resolved.

Re: Quota Throttle with pppoe bug

Posted: Thu Nov 11, 2010 1:19 am
by Eric
This should be fixed now -- I added code to make sure restriction rules and quotas get refreshed when the wan interface goes up, included as part of the gargoyle firewall hotplug script. Can you help test this (since I don't have access to a pppoe connection I can't test this specific condition very easily)?

Re: Quota Throttle with pppoe bug

Posted: Thu Nov 11, 2010 9:20 am
by pbix
I will check it this weekend.

Re: Quota Throttle with pppoe bug

Posted: Sat Nov 13, 2010 10:10 am
by pbix
Eric,
This does not seem to be working correctly. My configuration screen was very simple using one download quota.
quota.jpg
quota.jpg (106.38 KiB) Viewed 3216 times
I then just did an "ifwan down" and "ifwan up". The pppd part works great and it does call into initialize_quota_qos() properly but it seems that the cpu does not reach the tc calls in this routine because if the conditional logic there.

I think you should be able to reproduce this yourself using the above even without a pppoe connection.

Re: Quota Throttle with pppoe bug

Posted: Mon Nov 15, 2010 11:48 pm
by Eric
Thanks for testing this. I assume you mean "ifup wan" and "ifdown wan".

I did try exactly what you said, but it seemed to be working for me (which is why your testing is so helpful). I double checked and there shouldn't be any logic in there that wouldn't work so long as initialize_quota_qos() is getting called.

I'll check again (this time with a WRT54G-TM, which is what I know you're using, I was testing with a newer AR71xx router). If you have time could you you post shots of the iptables rules (mangle table, run iptables -t mangle -L -v) when it seems to be working, and after it isn't working (after you've restarted the wan interface), along with the difference in tc classes?

Re: Quota Throttle with pppoe bug

Posted: Tue Nov 16, 2010 8:39 pm
by pbix
Eric,
I tried this again and I have to admit that this time it seems to be working OK. I have not explanation other than maybe I was not waiting long enough for the WAN to come up before.