Revert "netfilter: ensure number of counters is >0 in do_replace()" 28/154928/2
authorBernhard Thaler <bernhard.thaler@wvnet.at>
Thu, 28 May 2015 08:26:18 +0000 (10:26 +0200)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 11 Oct 2017 11:56:10 +0000 (11:56 +0000)
commitd97f9b7c10460a4f7568f33f911885b827e7ada0
tree928683b053f0e58bf41525429dbd799285eb039e
parent6b6471579e72eb4283cd7ffa34b4d1573262fc54
Revert "netfilter: ensure number of counters is >0 in do_replace()"

commit d26e2c9ffa385dd1b646f43c1397ba12af9ed431 upstream.

This partially reverts commit 1086bbe97a07 ("netfilter: ensure number of
counters is >0 in do_replace()") in net/bridge/netfilter/ebtables.c.

Setting rules with ebtables does not work any more with 1086bbe97a07 place.

There is an error message and no rules set in the end.

e.g.

~# ebtables -t nat -A POSTROUTING --src 12:34:56:78:9a:bc -j DROP
Unable to update the kernel. Two possible causes:
1. Multiple ebtables programs were executing simultaneously. The ebtables
   userspace tool doesn't by default support multiple ebtables programs
running

Reverting the ebtables part of 1086bbe97a07 makes this work again.

Signed-off-by: Bernhard Thaler <bernhard.thaler@wvnet.at>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
[sw0312.kim: cherry-pick from linux-3.10.y to apply CVE]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I01b33f065e82745e98b865b630344539855e3866
net/bridge/netfilter/ebtables.c