wondershaper icon indicating copy to clipboard operation
wondershaper copied to clipboard

Cannot change limit without clear the limit

Open vincentcheng62 opened this issue 6 years ago • 8 comments

When I try to set the upload bandwidth the 2nd time, it doesn't work, i.e.

$ sudo wondershaper -a enp0s25 -u 400 $ sudo wondershaper -a enp0s25 -u 600 RTNETLINK answers: File exists RTNETLINK answers: File exists RTNETLINK answers: File exists RTNETLINK answers: File exists

What I can do is to clear the limit everytime when I want to change the limit, i.e. $ sudo wondershaper -a enp0s25 -u 400 $ sudo wondershaper -a enp0s25 -c $ sudo wondershaper -a enp0s25 -u 600

Is it a bug? Or this behavious is expected?

vincentcheng62 avatar Mar 23 '18 02:03 vincentcheng62

My observation has always been that the rules are overwritten. So this could be new behavior. It is best to clear the rules anyway. I will think about making wondershaper "smarter" in that it clears rules (if exist) before setting new ones.

magnific0 avatar Mar 28 '18 14:03 magnific0

Same behavior as reported by @vincentcheng62 on Ubuntu 16.04 LTS with HWE kernel (currently 4.13.0-43)

lesinigo avatar Jun 14 '18 08:06 lesinigo

Thanks, good to know. It's added to the list of features to clear the rules before new ones.

magnific0 avatar Jun 14 '18 08:06 magnific0

Hi, just wondering can't you just add a

wondershaper -a $IFACE -c 

before each usage or that would be too ugly ?

sigmaSd avatar Jun 14 '18 09:06 sigmaSd

The problem is that currently the clearing is too aggressive. Ideally you want to clear only the rules that for the specific task. So clear only outgoing rules before applying new outgoing rules, leaving incoming and who knows what other rules users have custom added intact.

Autoclearing all rules on an interface could break other programs and rules that people have set. Using -c still effectively does that now, but at least it's only manually invoked.

I'll try to have a look at it soon.

magnific0 avatar Jun 14 '18 09:06 magnific0

Got it thanks for the explanation.

sigmaSd avatar Jun 14 '18 09:06 sigmaSd

Sorry to necropost, but this is still an issue. The -c option doesn't do anything as far as I can tell. Once wondershaper -a ... -d ... -u ... has been run once, it is not possible to change the values in use or clear them without (at least) rebooting the machine.

davidjmemmett avatar Jul 12 '21 13:07 davidjmemmett

@davidjmemmett just tried it with 1.4.1 from arch aur and clearing with -c worked fine for me to update the limits with a 2. called after

ghostface avatar Aug 19 '21 10:08 ghostface