Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
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

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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