ebtables -X does not delete all unused chains
Alberto Treviño <[email protected]>
| Newsgroups | gmane.linux.network.bridge.ebtables.devel |
|---|---|
| Organization | Brigham Young University |
| Message-ID | <[email protected]> |
Needless to say I am playing with ebtables and I am finding a few bugs.
I don't know if the developers will be happy or if they will get tired
of all my bug reports. :-) I'm not trying to make the developer's life
difficult. I promise.
I am running 2.0.8-rc2 + segfault patch. I am writing a script to
program my bridge rules. At the beginning of the script I have the
following commands:
ebtables -F
ebtables -X
In theory, ebtables should flush all the chains in the default table and
remove all unused user-defined chains. I found the -X command,
however, is not deleting all the user-defined chains. It only deletes
the odd-numbered ones (as given in the list) and the even ones remain
intact. Here is the example, starting from scratch:
-------------------------------------------------
[root@slim-dev ~]# ebtables -N FIRST
[root@slim-dev ~]# ebtables -N SECOND
[root@slim-dev ~]# ebtables -N THIRD
[root@slim-dev ~]# ebtables -N FORTH
[root@slim-dev ~]# ebtables -N FIFTH
[root@slim-dev ~]# ebtables -L
Bridge table: filter
Bridge chain: INPUT, entries: 0, policy: ACCEPT
Bridge chain: FORWARD, entries: 0, policy: ACCEPT
Bridge chain: OUTPUT, entries: 0, policy: ACCEPT
Bridge chain: FIRST, entries: 0, policy: ACCEPT
Bridge chain: SECOND, entries: 0, policy: ACCEPT
Bridge chain: THIRD, entries: 0, policy: ACCEPT
Bridge chain: FORTH, entries: 0, policy: ACCEPT
Bridge chain: FIFTH, entries: 0, policy: ACCEPT
[root@slim-dev ~]# ebtables -X
[root@slim-dev ~]# ebtables -L
Bridge table: filter
Bridge chain: INPUT, entries: 0, policy: ACCEPT
Bridge chain: FORWARD, entries: 0, policy: ACCEPT
Bridge chain: OUTPUT, entries: 0, policy: ACCEPT
Bridge chain: SECOND, entries: 0, policy: ACCEPT
Bridge chain: FORTH, entries: 0, policy: ACCEPT
[root@slim-dev ~]# ebtables -X
[root@slim-dev ~]# ebtables -L
Bridge table: filter
Bridge chain: INPUT, entries: 0, policy: ACCEPT
Bridge chain: FORWARD, entries: 0, policy: ACCEPT
Bridge chain: OUTPUT, entries: 0, policy: ACCEPT
Bridge chain: FORTH, entries: 0, policy: ACCEPT
[root@slim-dev ~]# ebtables -X
[root@slim-dev ~]# ebtables -L
Bridge table: filter
Bridge chain: INPUT, entries: 0, policy: ACCEPT
Bridge chain: FORWARD, entries: 0, policy: ACCEPT
Bridge chain: OUTPUT, entries: 0, policy: ACCEPT
[root@slim-dev ~]#
-------------------------------------------------
This bug is not critical, since ebtables is still useable and I can work
around the bug.
Thanks again for your help.
--
Alberto Treviño
[email protected]
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV