netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] Netfilter fix for net
@ 2015-06-01 17:54 Pablo Neira Ayuso
  2015-06-01 17:54 ` [PATCH net] Revert "netfilter: ensure number of counters is >0 in do_replace()" Pablo Neira Ayuso
  2015-06-01 23:57 ` [PATCH net] Netfilter fix for net David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Pablo Neira Ayuso @ 2015-06-01 17:54 UTC (permalink / raw)
  To: netfilter-devel; +Cc: davem, netdev

Hi David,

The following patch reverts the ebtables chunk that enforces counters that was
introduced in the recently applied d26e2c9ffa38 ('Revert "netfilter: ensure
number of counters is >0 in do_replace()"') since this breaks ebtables.

You can pull this change from:

  git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git

Thanks!

----------------------------------------------------------------

The following changes since commit 9302d7bb0c5cd46be5706859301f18c137b2439f:

  sctp: Fix mangled IPv4 addresses on a IPv6 listening socket (2015-05-27 14:15:26 -0400)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git master

for you to fetch changes up to d26e2c9ffa385dd1b646f43c1397ba12af9ed431:

  Revert "netfilter: ensure number of counters is >0 in do_replace()" (2015-06-01 19:45:47 +0200)

----------------------------------------------------------------
Bernhard Thaler (1):
      Revert "netfilter: ensure number of counters is >0 in do_replace()"

 net/bridge/netfilter/ebtables.c |    4 ----
 1 file changed, 4 deletions(-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH net] Revert "netfilter: ensure number of counters is >0 in do_replace()"
  2015-06-01 17:54 [PATCH net] Netfilter fix for net Pablo Neira Ayuso
@ 2015-06-01 17:54 ` Pablo Neira Ayuso
  2015-06-01 23:57 ` [PATCH net] Netfilter fix for net David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Pablo Neira Ayuso @ 2015-06-01 17:54 UTC (permalink / raw)
  To: netfilter-devel; +Cc: davem, netdev

From: Bernhard Thaler <bernhard.thaler@wvnet.at>

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>
---
 net/bridge/netfilter/ebtables.c |    4 ----
 1 file changed, 4 deletions(-)

diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
index 24c7c96..91180a7 100644
--- a/net/bridge/netfilter/ebtables.c
+++ b/net/bridge/netfilter/ebtables.c
@@ -1117,8 +1117,6 @@ static int do_replace(struct net *net, const void __user *user,
 		return -ENOMEM;
 	if (tmp.num_counters >= INT_MAX / sizeof(struct ebt_counter))
 		return -ENOMEM;
-	if (tmp.num_counters == 0)
-		return -EINVAL;
 
 	tmp.name[sizeof(tmp.name) - 1] = 0;
 
@@ -2161,8 +2159,6 @@ static int compat_copy_ebt_replace_from_user(struct ebt_replace *repl,
 		return -ENOMEM;
 	if (tmp.num_counters >= INT_MAX / sizeof(struct ebt_counter))
 		return -ENOMEM;
-	if (tmp.num_counters == 0)
-		return -EINVAL;
 
 	memcpy(repl, &tmp, offsetof(struct ebt_replace, hook_entry));
 
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net] Netfilter fix for net
  2015-06-01 17:54 [PATCH net] Netfilter fix for net Pablo Neira Ayuso
  2015-06-01 17:54 ` [PATCH net] Revert "netfilter: ensure number of counters is >0 in do_replace()" Pablo Neira Ayuso
@ 2015-06-01 23:57 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2015-06-01 23:57 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel, netdev

From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Mon,  1 Jun 2015 19:54:01 +0200

> The following patch reverts the ebtables chunk that enforces counters that was
> introduced in the recently applied d26e2c9ffa38 ('Revert "netfilter: ensure
> number of counters is >0 in do_replace()"') since this breaks ebtables.
> 
> You can pull this change from:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf.git

Pulled, thanks Pablo.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-06-01 23:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-01 17:54 [PATCH net] Netfilter fix for net Pablo Neira Ayuso
2015-06-01 17:54 ` [PATCH net] Revert "netfilter: ensure number of counters is >0 in do_replace()" Pablo Neira Ayuso
2015-06-01 23:57 ` [PATCH net] Netfilter fix for net David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).