netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [NETFILTER]: Fix iptables ABI breakage on (at least) CRIS
@ 2007-01-16 14:03 Patrick McHardy
  2007-01-24  6:00 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Patrick McHardy @ 2007-01-16 14:03 UTC (permalink / raw)
  To: David S. Miller; +Cc: Netfilter Development Mailinglist

[-- Attachment #1: x --]
[-- Type: text/plain, Size: 1869 bytes --]

[NETFILTER]: Fix iptables ABI breakage on (at least) CRIS

With the introduction of x_tables we accidentally broke compatibility
by defining IPT_TABLE_MAXNAMELEN to XT_FUNCTION_MAXNAMELEN instead of
XT_TABLE_MAXNAMELEN, which is two bytes larger.

On most architectures it doesn't really matter since we don't have
any tables with names that long in the kernel and the structure
layout didn't change because of alignment requirements of following
members. On CRIS however (and other architectures that don't align
data) this changed the structure layout and thus broke compatibility
with old iptables binaries.

Changing it back will break compatibility with binaries compiled
against recent kernels again, but since the breakage has only been
there for three releases this seems like the better choice.

Spotted by Jonas Berlin <xkr47@outerspace.dyndns.org>.

Signed-off-by: Patrick McHardy <kaber@trash.net>

---
commit 192c132da69f6a3f53c8c30e2c45a6b51a7369e0
tree f3cf004fcb6a7752fc51af1fc12fe75301562aeb
parent f8f00b3d4bf918190a6edd5b94bbee452b4f5d64
author Patrick McHardy <kaber@trash.net> Tue, 16 Jan 2007 13:49:34 +0100
committer Patrick McHardy <kaber@trash.net> Tue, 16 Jan 2007 15:02:25 +0100

 include/linux/netfilter_ipv4/ip_tables.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h
index 4f06dad..98d566c 100644
--- a/include/linux/netfilter_ipv4/ip_tables.h
+++ b/include/linux/netfilter_ipv4/ip_tables.h
@@ -28,7 +28,7 @@ #include <linux/netfilter_ipv4.h>
 #include <linux/netfilter/x_tables.h>
 
 #define IPT_FUNCTION_MAXNAMELEN XT_FUNCTION_MAXNAMELEN
-#define IPT_TABLE_MAXNAMELEN XT_FUNCTION_MAXNAMELEN
+#define IPT_TABLE_MAXNAMELEN XT_TABLE_MAXNAMELEN
 #define ipt_match xt_match
 #define ipt_target xt_target
 #define ipt_table xt_table

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

* Re: [NETFILTER]: Fix iptables ABI breakage on (at least) CRIS
  2007-01-16 14:03 [NETFILTER]: Fix iptables ABI breakage on (at least) CRIS Patrick McHardy
@ 2007-01-24  6:00 ` David Miller
  2007-01-24 16:47   ` Patrick McHardy
  0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2007-01-24  6:00 UTC (permalink / raw)
  To: kaber; +Cc: netfilter-devel

From: Patrick McHardy <kaber@trash.net>
Date: Tue, 16 Jan 2007 15:03:01 +0100

> [NETFILTER]: Fix iptables ABI breakage on (at least) CRIS
> 
> With the introduction of x_tables we accidentally broke compatibility
> by defining IPT_TABLE_MAXNAMELEN to XT_FUNCTION_MAXNAMELEN instead of
> XT_TABLE_MAXNAMELEN, which is two bytes larger.
> 
> On most architectures it doesn't really matter since we don't have
> any tables with names that long in the kernel and the structure
> layout didn't change because of alignment requirements of following
> members. On CRIS however (and other architectures that don't align
> data) this changed the structure layout and thus broke compatibility
> with old iptables binaries.
> 
> Changing it back will break compatibility with binaries compiled
> against recent kernels again, but since the breakage has only been
> there for three releases this seems like the better choice.
> 
> Spotted by Jonas Berlin <xkr47@outerspace.dyndns.org>.
> 
> Signed-off-by: Patrick McHardy <kaber@trash.net>

Applied, push this to -stable if you haven't already Patrick.

Thanks.

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

* Re: [NETFILTER]: Fix iptables ABI breakage on (at least) CRIS
  2007-01-24  6:00 ` David Miller
@ 2007-01-24 16:47   ` Patrick McHardy
  0 siblings, 0 replies; 3+ messages in thread
From: Patrick McHardy @ 2007-01-24 16:47 UTC (permalink / raw)
  To: David Miller; +Cc: netfilter-devel

David Miller wrote:
> From: Patrick McHardy <kaber@trash.net>
>
>>[NETFILTER]: Fix iptables ABI breakage on (at least) CRIS
>>
> Applied, push this to -stable if you haven't already Patrick.

Done. Thanks Dave.

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

end of thread, other threads:[~2007-01-24 16:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-16 14:03 [NETFILTER]: Fix iptables ABI breakage on (at least) CRIS Patrick McHardy
2007-01-24  6:00 ` David Miller
2007-01-24 16:47   ` Patrick McHardy

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).