Open vincentcheng62 opened 6 years ago
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.
Same behavior as reported by @vincentcheng62 on Ubuntu 16.04 LTS with HWE kernel (currently 4.13.0-43)
Thanks, good to know. It's added to the list of features to clear the rules before new ones.
Hi, just wondering can't you just add a
wondershaper -a $IFACE -c
before each usage or that would be too ugly ?
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.
Got it thanks for the explanation.
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 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
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?