On 12/4/07, Patrick McHardy <kaber@xxxxxxxxx> wrote: > Jan Engelhardt wrote: > > On Dec 4 2007 09:18, Patrick McHardy wrote: > >> Salatiel Filho wrote: > >>> On Dec 3, 2007 5:07 AM, Patrick McHardy <kaber@xxxxxxxxx> wrote: > >>>> Salatiel Filho wrote: > >>>>> # iptables -L > >>>>> iptables v1.3.6: can't initialize iptables table `filter': Bad file > >>>>> descriptor > >>>>> Perhaps iptables or your kernel needs to be upgraded. > >>>>> > >>>>> My machine is a ARM machine with debian 4.0. > >>>>> I also have already tried 1.3.8 and got the same error. > >>>> Which kernel version (please also send .config)? Did you compile > >>>> iptables yourself or used a version from Debian? > >>>> > > > > This looks more like an userspace issue. The strace log shows that the > > netlink socket was obtained, but calls setsockopt with fd=-1. > > Just a guess, though. > > > Right, I missed that, thanks. Jesper seems to be correct, if autoloading > fails we close the socket and decrement sockfd_use twice, which causes > iptables to not open it again for the second attempt. > > Salatiel, does this patch fix the problem? > > Index: libiptc/libiptc.c > =================================================================== > --- libiptc/libiptc.c (Revision 7130) > +++ libiptc/libiptc.c (Arbeitskopie) > @@ -866,10 +866,6 @@ > CHECK(h); > return h; > error: > - if (--sockfd_use == 0) { > - close(sockfd); > - sockfd = -1; > - } > TC_FREE(&h); > return NULL; > } > > I tried the patch but it didn`t work. ~# iptables --version [patched now] iptables v1.3.8 ~# iptables -L iptables v1.3.8: can't initialize iptables table `filter': Invalid argument Perhaps iptables or your kernel needs to be upgraded. ~# lsmod Module Size Used by iptable_filter 2304 0 ip_tables 22016 1 iptable_filter snd_mixer_oss 14848 0 snd 41976 1 snd_mixer_oss soundcore 7524 1 snd -- []'s Salatiel "O maior prazer do inteligente é bancar o idiota diante de um idiota que banca o inteligente". - To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html