Quota Throttle with pppoe bug

If your problem doesn't fall into one of the other categories, report it here.

Moderator: Moderators

Post Reply
pbix
Developer
Posts: 1373
Joined: Fri Aug 21, 2009 5:09 pm

Quota Throttle with pppoe bug

Post 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.
Linksys WRT1900ACv2
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM

Eric
Site Admin
Posts: 1443
Joined: Sat Jun 14, 2008 1:14 pm

Re: Quota Throttle with pppoe bug

Post 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)?

pbix
Developer
Posts: 1373
Joined: Fri Aug 21, 2009 5:09 pm

Re: Quota Throttle with pppoe bug

Post by pbix »

I will check it this weekend.
Linksys WRT1900ACv2
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM

pbix
Developer
Posts: 1373
Joined: Fri Aug 21, 2009 5:09 pm

Re: Quota Throttle with pppoe bug

Post 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 3215 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.
Linksys WRT1900ACv2
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM

Eric
Site Admin
Posts: 1443
Joined: Sat Jun 14, 2008 1:14 pm

Re: Quota Throttle with pppoe bug

Post 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?

pbix
Developer
Posts: 1373
Joined: Fri Aug 21, 2009 5:09 pm

Re: Quota Throttle with pppoe bug

Post 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.
Linksys WRT1900ACv2
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM

Post Reply