RFC: Fix rule attribute comparison

Thomas Graf tgraf at infradead.org
Mon Apr 19 06:45:31 EDT 2010


On Wed, Apr 07, 2010 at 07:21:47PM +0200, Patrick McHardy wrote:

> commit bdd1d09c1149e230e91157347fe86517c74f5084
> Author: Patrick McHardy <kaber at trash.net>
> Date:   Tue Apr 6 18:47:46 2010 +0200
> 
>     Fix rule attribute comparison
>     
>     Rules don't have unique identifiers, so all attributes are compared
>     by initializing the ID mask to ~0. This doesn't work however since
>     nl_object_identical verifies whether the ID attributes are actually
>     present before comparing the objects, which is never the case.
>     
>     Work around by using the intersection of present attributes when
>     comparing two rule objects.
>     
>     Signed-off-by: Patrick McHardy <kaber at trash.net>

Good idea. Applied, thanks Patrick.



More information about the libnl mailing list