Bug 619797 - ebtables -Z does not reset counters
Summary: ebtables -Z does not reset counters
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ebtables
Version: 17
Hardware: All
OS: Linux
low
high
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-30 14:54 UTC by Vsevolod Volkov
Modified: 2012-08-22 21:00 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-08-22 21:00:37 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Vsevolod Volkov 2010-07-30 14:54:14 UTC
Description of problem:
The following commands don't reset counters of selected chain:
ebtables -t broute -Z TESTCHAIN
or
ebtables -t broute -L TESTCHAIN -Z TESTCHAIN --Lc

Version-Release number of selected component (if applicable):
ebtables-2.0.9-5.fc13.x86_64

How reproducible:
Create a chain with some rules. Try to reset counters of the chain.

Steps to Reproduce:
1. Create new chain:
ebtables -t broute -N TESTCHAIN

2. Jump to the chain from BROUTING chain:
ebtables -t broute -I BROUTING -j TESTCHAIN

3. Add some rule(s):
ebtables -t broute -A TESTCHAIN -p IPv4

4. Wait for counters are growing.

5. Stop using of TESTCHAIN to freeze counters:
ebtables -t broute -D BROUTING -j TESTCHAIN

6. Ensure, that counters are not zero:
ebtables -t broute -L TESTCHAIN --Lc

Bridge chain: TESTCHAIN, entries: 1, policy: ACCEPT
-p IPv4 -j CONTINUE , pcnt = 4950 -- bcnt = 1858823

7. Try to reset counters:
ebtables -t broute -Z TESTCHAIN

8. Counters should be zero (but really are not):
ebtables -t broute -L TESTCHAIN --Lc

Bridge chain: TESTCHAIN, entries: 1, policy: ACCEPT
-p IPv4 -j CONTINUE , pcnt = 2251 -- bcnt = 107712

Actual results:
Counters has been changed, but not to zero:
-p IPv4 -j CONTINUE , pcnt = 2251 -- bcnt = 107712

Expected results:
ounters should be zero:
-p IPv4 -j CONTINUE , pcnt = 0 -- bcnt = 0


Additional info:
Previous version from Fedora 12 works properly:
ebtables-2.0.9-2.fc12.x86_64

Comment 1 Bug Zapper 2011-06-01 12:28:39 UTC
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Vsevolod Volkov 2011-06-10 09:24:34 UTC
The problem is confirmed in Fedora 15.

Comment 3 Tom "spot" Callaway 2011-06-13 17:36:33 UTC
I'm having trouble reproducing your scenario, because I can't manage to get the counters to ever increment with your test rule. :/

Comment 4 Vsevolod Volkov 2011-06-21 14:10:20 UTC
Please try the following steps:

1. Create new chain:
ebtables -t broute -N TESTCHAIN

2. Jump to the chain from BROUTING chain:
ebtables -t broute -I BROUTING -j TESTCHAIN

3. Add some rule(s) in TESTCHAIN chain:
ebtables -t broute -A TESTCHAIN -p IPv4

4. Display counters:
ebtables -t broute -L --Lc

Result:
Bridge chain: BROUTING, entries: 1, policy: ACCEPT
-j TESTCHAIN, pcnt = 0 -- bcnt = 0

Bridge chain: TESTCHAIN, entries: 1, policy: ACCEPT
-p IPv4 -j CONTINUE , pcnt = 0 -- bcnt = 0

5. Set counters of the rule in BROUTING chain:
ebtables -t broute -C BROUTING 1 111 222
then display counters:
ebtables -t broute -L --Lc

Result:
Bridge chain: BROUTING, entries: 1, policy: ACCEPT
-j TESTCHAIN, pcnt = 111 -- bcnt = 222

Bridge chain: TESTCHAIN, entries: 1, policy: ACCEPT
-p IPv4 -j CONTINUE , pcnt = 0 -- bcnt = 0

6. Try to set counters of the rule in TESTCHAIN chain:
ebtables -t broute -C TESTCHAIN 1 333 444
then display counters:
ebtables -t broute -L --Lc

Expected result:
Bridge chain: BROUTING, entries: 1, policy: ACCEPT
-j TESTCHAIN, pcnt = 111 -- bcnt = 222

Bridge chain: TESTCHAIN, entries: 1, policy: ACCEPT
-p IPv4 -j CONTINUE , pcnt = 333 -- bcnt = 444

Actual result:
Bridge chain: BROUTING, entries: 1, policy: ACCEPT
-j TESTCHAIN, pcnt = 111 -- bcnt = 222

Bridge chain: TESTCHAIN, entries: 1, policy: ACCEPT
-p IPv4 -j CONTINUE , pcnt = 111 -- bcnt = 222

7. Try to reset counters of TESTCHAIN chain:
ebtables -t broute -Z TESTCHAIN
then display counters:
ebtables -t broute -L --Lc

Expected result:
Bridge chain: BROUTING, entries: 1, policy: ACCEPT
-j TESTCHAIN, pcnt = 111 -- bcnt = 222

Bridge chain: TESTCHAIN, entries: 1, policy: ACCEPT
-p IPv4 -j CONTINUE , pcnt = 0 -- bcnt = 0

Actual result:
Bridge chain: BROUTING, entries: 1, policy: ACCEPT
-j TESTCHAIN, pcnt = 111 -- bcnt = 222

Bridge chain: TESTCHAIN, entries: 1, policy: ACCEPT
-p IPv4 -j CONTINUE , pcnt = 111 -- bcnt = 222

Comment 5 Fedora End Of Life 2012-08-07 19:42:49 UTC
This message is a notice that Fedora 15 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 15. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 15 reached end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 6 Tom "spot" Callaway 2012-08-13 19:30:21 UTC
Are you sure this bug still exists in F17? I get "ACTUAL RESULT" for every item in your test case with ebtables-2.0.10-5.fc17.x86_64.

The upstream ChangeLog also claims this is fixed:

20111215
        Changelog for v2.0.10-4
        * really fix counter setting bug (thanks to James' persistence)
20111204
        Changelog for v2.0.10-3
        * fix counter setting bug (reported by James Sinclair)

I think this bug probably still exists in F-16, so I'll push 2.0.10-5 there.

Comment 7 Fedora Update System 2012-08-13 20:10:13 UTC
ebtables-2.0.10-5.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/ebtables-2.0.10-5.fc16

Comment 8 Fedora Update System 2012-08-14 09:21:32 UTC
Package ebtables-2.0.10-5.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing ebtables-2.0.10-5.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-11854/ebtables-2.0.10-5.fc16
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2012-08-22 21:00:37 UTC
ebtables-2.0.10-5.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.