Re: library for ebtales

Bart De Schuymer <[email protected]>
Newsgroups gmane.linux.network.bridge.ebtables.devel
Message-ID <[email protected]>
Op ma, 04-04-2005 te 23:00 +0200, schreef Jens Götze:
> in future i will enlarge my activities for iptables and ebtables.
> currently i have few time for that hobby, because i write my degree
> dissertation. yes, add this lib to the cvs tree. it is a good first step
> for an little cute lib.

Good luck with your dissertation. That's how I started my work on
ebtables too.

> yes, the implementation is correct. i have tested this implementation
> and you can find this test in folder 'test' under 'ebtc_test2.c'.
> 
> output of this test:
> 
> Rule list in chain INPUT before delete
> ~  Entry jump to 'CONTINUE' (bcnt = 34706; pcnt = 64)
> ~  Entry jump to 'CONTINUE' (bcnt = 46; pcnt = 1)
> 
> Delete second entry
> 
> Rule list in chain INPUT after delete
> ~  Entry jump to 'CONTINUE' (bcnt = 34706; pcnt = 64)
> 
> Append entry
> 
> Rule list in chain INPUT after commit
> ~  Entry jump to 'CONTINUE' (bcnt = 34706; pcnt = 64)
> ~  Entry jump to 'CONTINUE' (bcnt = 0; pcnt = 0)

What if the bcnt counter of the first rule increased (in the kernel)
from 34706 to 34707 after the delete and before the commit? Your code
will put the counter back on 34706 after the commit.
I see you put replace->num_counters = 0; on line 1702, this is wrong.

cheers,
Bart




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.