From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Salatiel Filho" Subject: Re: iptables -> can't initialize iptables table `filter': Bad file descriptor Date: Tue, 4 Dec 2007 13:32:49 -0300 Message-ID: References: <47551A83.80009@trash.net> <475561C6.4030704@trash.net> <47556D32.1060901@trash.net> <475578F1.8060600@trash.net> <47557D04.1040101@trash.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: "Netfilter Development Mailinglist" To: "Patrick McHardy" Return-path: Received: from wr-out-0506.google.com ([64.233.184.236]:55156 "EHLO wr-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751160AbXLDQcv convert rfc822-to-8bit (ORCPT ); Tue, 4 Dec 2007 11:32:51 -0500 Received: by wr-out-0506.google.com with SMTP id c49so3044004wra for ; Tue, 04 Dec 2007 08:32:50 -0800 (PST) In-Reply-To: <47557D04.1040101@trash.net> Content-Disposition: inline Sender: netfilter-devel-owner@vger.kernel.org List-ID: On 12/4/07, Patrick McHardy wrote: > Salatiel Filho wrote: > > On 12/4/07, Patrick McHardy wrote: > >> Salatiel Filho wrote: > >>> ~# iptables -L > >>> iptables v1.3.8: can't initialize iptables table `filter': Invali= d argument > >>> Perhaps iptables or your kernel needs to be upgraded. > >>> > >>> # dmesg > >>> ip_tables: (C) 2000-2002 Netfilter core team > >>> translate_table: size 632 > >>> Finished chain 1 > >>> Finished chain 2 > >>> Finished chain 3 > >>> table->private->number =3D 4 > >>> get_entries: 668 !=3D 672 > >> This looks like an alignment problem. Old kernels required > >> alignof(struct ipt_entry), which should be 4. Userspace > >> compiled against current headers use: > >> > >> struct _xt_align > >> { > >> u_int8_t u8; > >> u_int16_t u16; > >> u_int32_t u32; > >> u_int64_t u64; > >> }; > >> > >> #define XT_ALIGN(s) (((s) + (__alignof__(struct _xt_align)-1)) \ > >> > >> & ~(__alignof__(struct _xt_align)-1)) > >> > >> which I guess is 8 on ARM. Does removing the u_int64_t > >> from the struct above in the iptables source > >> (include/linux/netfilter/x_tables.h) help? > >> > >> > > > > I can not find include/linux/netfilter/x_tables.h in iptables sourc= e. > > > > # ls -1 include/linux/netfilter/ > > nf_conntrack_common.h > > nf_conntrack_tuple_common.h > > nf_conntrack_tuple.h > > nf_nat.h > > Right, we only recently added it. Are you compiling against your > kernel source? Otherwise check in /usr/include/linux/... > How do i know if i am compiling against my kernel source ? Does it auto use /usr/src/linux/... ? anyway , i changed /usr/include/linux/linux/netfilter/x_tables.h but still the same problem. # iptables -L iptables v1.3.8: can't initialize iptables table `filter': Invalid argu= ment Perhaps iptables or your kernel needs to be upgraded. # dmesg ip_tables: (C) 2000-2002 Netfilter core team translate_table: size 632 =46inished chain 1 =46inished chain 2 =46inished chain 3 table->private->number =3D 4 get_entries: 668 !=3D 672 --=20 []'s Salatiel "O maior prazer do inteligente =E9 bancar o idiota diante de um idiota que banca o inteligente". - To unsubscribe from this list: send the line "unsubscribe netfilter-dev= el" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html