5

I have added a filter in tc as follows:

tc filter add dev eth0 parent 1: protocol ip handle 6 fw flowid 1:6

This should be sending packets marked by iptables with '--set-mark 6' to class 1:6. The problem is, I can't figure out how to later delete this filter. Replacing 'add' with 'delete' doesn't work, I get a 'RTNETLINK answers: No such file or directory' error message. I've tried a number of other combinations to delete it, but none seem to work.

Thanks for any help.

  • Did you try 'del' instead of 'delete'? – Dan Andreatta Feb 22 '12 at 16:32
  • @Dan Yup, same result – Neal Feb 22 '12 at 19:37
5

The thing is when you issue filter add w/o exact preference/priority number, it gets assigned automatically, you can see it with:

tc filter show dev eth0

and it would get deleted as easy as

tc filter del dev eth0 prio nUmErIc

If you need more control you have to specify 'prio' exactly:

tc filter add dev eth0 parent 1: protocol ip prio 1 handle 6 fw flowid 1:6

In this way it's up to either you repeat all the gory details to remove filter or just use the former way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.