2008-08-19 12:05:30

by Hinko Kocevar

[permalink] [raw]
Subject: iptables-1.4.0 with 2.6.26

Hi,

Trying to build iptables-1.4.0 with 2.6.26 kernel on x86 fails with:

hinkok@alala /tmp/iptables-1.4.0 $ make
Extensions found:
cc -O2 -Wall -Wunused -I"/lib/modules/2.6.26/build"/include -I"/lib/modules/2.6.26/source"/include -Iinclude/ -DIPTABLES_VERSION=\"1.4.0\" -fPIC -o extensions/libxt_sctp_sh.o -c extensions/libxt_sctp.c
In file included from extensions/libxt_sctp.c:23:
/lib/modules/2.6.26/build/include/linux/netfilter/xt_sctp.h:68: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__sctp_chunkmap_is_clear'
/lib/modules/2.6.26/build/include/linux/netfilter/xt_sctp.h:80: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__sctp_chunkmap_is_all_set'
extensions/libxt_sctp.c: In function 'print_chunks':
extensions/libxt_sctp.c:416: warning: implicit declaration of function '__sctp_chunkmap_is_clear'
extensions/libxt_sctp.c:421: warning: implicit declaration of function '__sctp_chunkmap_is_all_set'
make: *** [extensions/libxt_sctp_sh.o] Error 1

I think it complains about the bool type.

Regards,
Hinko

--
ČETRTA POT, d.o.o., Kranj
Planina 3
4000 Kranj
Slovenia, Europe
Tel. +386 (0) 4 280 66 03
E-mail: [email protected]
Http: http://www.cetrtapot.si


2008-08-19 14:11:43

by Hinko Kocevar

[permalink] [raw]
Subject: Re: iptables-1.4.0 with 2.6.26

Phil Oester wrote:
> On Tue, Aug 19, 2008 at 01:35:07PM +0200, Hinko Kocevar wrote:
>> Hi,
>>
>> Trying to build iptables-1.4.0 with 2.6.26 kernel on x86 fails with:
>
> Try 1.4.1.1 instead?
>

Well, it builds.
But trying to add simple rule fails:

hinkok@alala /tmp/iptables-1.4.1.1 $ sudo ./iptables -A INPUT -p tcp --dport 80 -j DROP
iptables v1.4.1.1: Unknown arg `--dport'
Try `iptables -h' or 'iptables --help' for more information.


Regards,
Hinko

--
ČETRTA POT, d.o.o., Kranj
Planina 3
4000 Kranj
Slovenia, Europe
Tel. +386 (0) 4 280 66 03
E-mail: [email protected]
Http: http://www.cetrtapot.si

2008-08-19 14:12:52

by Phil Oester

[permalink] [raw]
Subject: Re: iptables-1.4.0 with 2.6.26

On Tue, Aug 19, 2008 at 01:35:07PM +0200, Hinko Kocevar wrote:
> Hi,
>
> Trying to build iptables-1.4.0 with 2.6.26 kernel on x86 fails with:

Try 1.4.1.1 instead?

Phil

2008-08-19 15:25:18

by Phil Oester

[permalink] [raw]
Subject: Re: iptables-1.4.0 with 2.6.26

On Tue, Aug 19, 2008 at 04:11:26PM +0200, Hinko Kocevar wrote:
> Well, it builds.
> But trying to add simple rule fails:
>
> hinkok@alala /tmp/iptables-1.4.1.1 $ sudo ./iptables -A INPUT -p tcp --dport 80 -j DROP
> iptables v1.4.1.1: Unknown arg `--dport'
> Try `iptables -h' or 'iptables --help' for more information.

Yes, that wouldn't work unless you built a static iptables binary (--enable-static).
Please run make install, then it will work for you from the install directory.

Phil

2008-08-19 15:33:17

by Hinko Kocevar

[permalink] [raw]
Subject: Re: iptables-1.4.0 with 2.6.26

Phil Oester wrote:
> On Tue, Aug 19, 2008 at 04:11:26PM +0200, Hinko Kocevar wrote:
>> Well, it builds.
>> But trying to add simple rule fails:
>>
>> hinkok@alala /tmp/iptables-1.4.1.1 $ sudo ./iptables -A INPUT -p tcp --dport 80 -j DROP
>> iptables v1.4.1.1: Unknown arg `--dport'
>> Try `iptables -h' or 'iptables --help' for more information.
>
> Yes, that wouldn't work unless you built a static iptables binary (--enable-static).

Tried and it works, with forcing symlink on iptables-static.
hinkok@alala /tmp/iptables-1.4.1.1 $ rm iptables
hinkok@alala /tmp/iptables-1.4.1.1 $ ln -s iptables-static iptables
hinkok@alala /tmp/iptables-1.4.1.1 $ sudo ./iptables -A INPUT -p tcp --dport 80 -j DROP
hinkok@alala /tmp/iptables-1.4.1.1 $

> Please run make install, then it will work for you from the install directory.

Will this be a problem on an embedded system, when iptables are cross compiled?
Are there some cynimic libraries that are pulled in from somewhere (probably destdir installation dir)?

Thank you,
Hinko

--
ČETRTA POT, d.o.o., Kranj
Planina 3
4000 Kranj
Slovenia, Europe
Tel. +386 (0) 4 280 66 03
E-mail: [email protected]
Http: http://www.cetrtapot.si

2008-08-19 15:56:21

by Phil Oester

[permalink] [raw]
Subject: Re: iptables-1.4.0 with 2.6.26

On Tue, Aug 19, 2008 at 05:32:53PM +0200, Hinko Kocevar wrote:
> > Please run make install, then it will work for you from the install directory.
>
> Will this be a problem on an embedded system, when iptables are cross compiled?
> Are there some cynimic libraries that are pulled in from somewhere (probably destdir installation dir)?

Well, if you use the non-static version, then you need the various .so files -
see /lib/xtables/lib*.

Phil