[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bugfix u32 filters: Patch instead of whole file


To better recognize the changes I have made to cls_u32.c, I have
attached a patch against DS pre9 below.




I have looked a little into the problems with deleting u32 Filters.

I'm using DS8 with the pre9 patches posted on the 9th of July by
Werner on a 2.2.14 System (however, 2.2.16 should have the same
problems since no file has changed in linux/net/sched since then).

I found two additional problems with deleting filters apart from the
one fixed by ds pre9.

1. Refcnt of child-Filters (non root_ht) was not set correctly on
2. When performing a 'tc qdisc del dev eth0 root' these
   child Filters were not deleted correctly (memory leak).

With both fixes I can delete child filters with something like:

'tc filter del dev eth1 protocol ip prio 244 parent 1:0 handle 800::801

Furthermore, I added a fix so that 'tc filter ls' did not show filter
twice or even more often.  This happened when adding several u32
filters to a queue with different priorities.

A 'tc filter ls' showed a list of filters for all used priorities, but
the child-Filter (non-root ht) were shown in each filter-priority-list
regardlessly of the priority of the child filter.

I did not have time to test these patches that much, so please be
careful :-) 

Of course, I am interested in feedback.

The cls_u32.c file including the ds9pre patch and my patches is
attached below.


/J"org Diederich