All of lore.kernel.org
 help / color / mirror / Atom feed
* Unable to build iptables on linux kernel 2.6.10 + 2.6.11-rc2 + 2.6.11-rc2-bk5
@ 2005-01-27 15:53 Colin Harrison
  2005-01-30 22:27 ` Pablo Neira
  0 siblings, 1 reply; 7+ messages in thread
From: Colin Harrison @ 2005-01-27 15:53 UTC (permalink / raw)
  To: netfilter-devel

Hi
I am experimenting with the linux kernel 2.6.10 + 2.6.11-rc2 +
2.6.11-rc2-bk5.
When I try to build CVS snapshot iptables (iptables-1.3.0-20050125) against
this kernel I get:-


make KERNEL_DIR=/home/src/kernel/linux-2.6.10
....
cc -O2 -Wall -Wunused -I/home/src/kernel/linux-2.6.10/include -Iinclude/
-DIPTABLES_VERSION=\"1.3.0-20050125\"  -fPIC -o
extensions/libipt_conntrack_sh.o -c extensions/libipt_conntrack.c
In file included from extensions/libipt_conntrack.c:13:
/home/src/kernel/linux-2.6.10/include/linux/netfilter_ipv4/ip_conntrack_tupl
e.h:67: error: parse error before "u8"
/home/src/kernel/linux-2.6.10/include/linux/netfilter_ipv4/ip_conntrack_tupl
e.h:67: warning: no semicolon at end of struct or union
/home/src/kernel/linux-2.6.10/include/linux/netfilter_ipv4/ip_conntrack_tupl
e.h:67: warning: no semicolon at end of struct or union
/home/src/kernel/linux-2.6.10/include/linux/netfilter_ipv4/ip_conntrack_tupl
e.h:70: warning: type defaults to `int' in declaration of `dir'
...

The kernel appears to be patched with all the latest conntrack changes and
compiles cleanly.

More info. can be supplied, as required.

Thanks

Colin Harrison

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

* Re: Unable to build iptables on linux kernel 2.6.10 + 2.6.11-rc2 + 2.6.11-rc2-bk5
  2005-01-27 15:53 Unable to build iptables on linux kernel 2.6.10 + 2.6.11-rc2 + 2.6.11-rc2-bk5 Colin Harrison
@ 2005-01-30 22:27 ` Pablo Neira
  2005-02-01  0:51   ` Thomas Graf
  2005-02-01 13:17   ` Patrick McHardy
  0 siblings, 2 replies; 7+ messages in thread
From: Pablo Neira @ 2005-01-30 22:27 UTC (permalink / raw)
  To: Colin Harrison; +Cc: netfilter-devel, Patrick McHardy

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

Colin Harrison wrote:

>Hi
>I am experimenting with the linux kernel 2.6.10 + 2.6.11-rc2 +
>2.6.11-rc2-bk5.
>When I try to build CVS snapshot iptables (iptables-1.3.0-20050125) against
>this kernel I get:-
>
>
>make KERNEL_DIR=/home/src/kernel/linux-2.6.10
>....
>cc -O2 -Wall -Wunused -I/home/src/kernel/linux-2.6.10/include -Iinclude/
>-DIPTABLES_VERSION=\"1.3.0-20050125\"  -fPIC -o
>extensions/libipt_conntrack_sh.o -c extensions/libipt_conntrack.c
>In file included from extensions/libipt_conntrack.c:13:
>/home/src/kernel/linux-2.6.10/include/linux/netfilter_ipv4/ip_conntrack_tupl
>e.h:67: error: parse error before "u8"
>  
>
u8 seems not to be defined in user space, that's why iptables complains 
in compilation time. A quick grep at /usr/include on my laptop tells me 
that such definition doesn't exist in user space. AFAICS it's only 
defined in kernel space. So, I've renamed it to u_int8_t and that fixed 
the problem.

Patrick, if this is the best way to fix this problem, are you willing to 
add it to your patchset?

Signed-off-by: Pablo Neira Ayuso <pablo@eurodev.net>

--
Pablo

[-- Attachment #2: x --]
[-- Type: text/plain, Size: 424 bytes --]

===== include/linux/netfilter_ipv4/ip_conntrack_tuple.h 1.6 vs edited =====
--- 1.6/include/linux/netfilter_ipv4/ip_conntrack_tuple.h	2005-01-17 23:02:05 +01:00
+++ edited/include/linux/netfilter_ipv4/ip_conntrack_tuple.h	2005-01-30 23:19:09 +01:00
@@ -64,10 +64,10 @@
 		} u;
 
 		/* The protocol. */
-		u8 protonum;
+		u_int8_t protonum;
 
 		/* The direction (for tuplehash) */
-		u8 dir;
+		u_int8_t dir;
 	} dst;
 };
 

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

* Re: Unable to build iptables on linux kernel 2.6.10 + 2.6.11-rc2 + 2.6.11-rc2-bk5
  2005-01-30 22:27 ` Pablo Neira
@ 2005-02-01  0:51   ` Thomas Graf
  2005-02-01  1:31     ` Pablo Neira
                       ` (2 more replies)
  2005-02-01 13:17   ` Patrick McHardy
  1 sibling, 3 replies; 7+ messages in thread
From: Thomas Graf @ 2005-02-01  0:51 UTC (permalink / raw)
  To: Pablo Neira; +Cc: netfilter-devel, Patrick McHardy, Colin Harrison

>  		/* The protocol. */
> -		u8 protonum;
> +		u_int8_t protonum;
>  
>  		/* The direction (for tuplehash) */
> -		u8 dir;
> +		u_int8_t dir;

I think __u8 would be a better choice.

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

* Re: Unable to build iptables on linux kernel 2.6.10 + 2.6.11-rc2 + 2.6.11-rc2-bk5
  2005-02-01  0:51   ` Thomas Graf
@ 2005-02-01  1:31     ` Pablo Neira
  2005-02-01  7:04     ` Tomáš Macek
  2005-02-01 13:17     ` Patrick McHardy
  2 siblings, 0 replies; 7+ messages in thread
From: Pablo Neira @ 2005-02-01  1:31 UTC (permalink / raw)
  To: Thomas Graf; +Cc: netfilter-devel, Patrick McHardy, Colin Harrison

Thomas Graf wrote:

>> 		/* The protocol. */
>>-		u8 protonum;
>>+		u_int8_t protonum;
>> 
>> 		/* The direction (for tuplehash) */
>>-		u8 dir;
>>+		u_int8_t dir;
>>    
>>
>
>I think __u8 would be a better choice.
>  
>

I don't think so. With __u8 iptables doesn't compile anymore on my laptop.

cc -O2 -Wall -Wunused -I/home/pablo/bk/linux-2.5/include -Iinclude/ 
-DIPTABLES_VERSION=\"1.3.0\"  -fPIC -o extensions/libipt_conntrack_sh.o 
-c extensions/libipt_conntrack.c
In file included from extensions/libipt_conntrack.c:13:
/home/pablo/bk/linux-2.5/include/linux/netfilter_ipv4/ip_conntrack_tuple.h:67: 
parse error before `__u8'
/home/pablo/bk/linux-2.5/include/linux/netfilter_ipv4/ip_conntrack_tuple.h:67: 
warning: no semicolon at end of struct or union
...

--
Pablo

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

* Re: Unable to build iptables on linux kernel 2.6.10 + 2.6.11-rc2 + 2.6.11-rc2-bk5
  2005-02-01  0:51   ` Thomas Graf
  2005-02-01  1:31     ` Pablo Neira
@ 2005-02-01  7:04     ` Tomáš Macek
  2005-02-01 13:17     ` Patrick McHardy
  2 siblings, 0 replies; 7+ messages in thread
From: Tomáš Macek @ 2005-02-01  7:04 UTC (permalink / raw)
  To: netfilter-devel

Whats the exact difference between each of the possibilities?


On Tue, 1 Feb 2005, Thomas Graf wrote:

>>  		/* The protocol. */
>> -		u8 protonum;
>> +		u_int8_t protonum;
>>
>>  		/* The direction (for tuplehash) */
>> -		u8 dir;
>> +		u_int8_t dir;
>
> I think __u8 would be a better choice.
>
>
>
>
>
>
>

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

* Re: Unable to build iptables on linux kernel 2.6.10 + 2.6.11-rc2 + 2.6.11-rc2-bk5
  2005-01-30 22:27 ` Pablo Neira
  2005-02-01  0:51   ` Thomas Graf
@ 2005-02-01 13:17   ` Patrick McHardy
  1 sibling, 0 replies; 7+ messages in thread
From: Patrick McHardy @ 2005-02-01 13:17 UTC (permalink / raw)
  To: Pablo Neira; +Cc: netfilter-devel, Colin Harrison

Pablo Neira wrote:

> u8 seems not to be defined in user space, that's why iptables 
> complains in compilation time. A quick grep at /usr/include on my 
> laptop tells me that such definition doesn't exist in user space. 
> AFAICS it's only defined in kernel space. So, I've renamed it to 
> u_int8_t and that fixed the problem.
>
> Patrick, if this is the best way to fix this problem, are you willing 
> to add it to your patchset?

It's the easiest way :)

Applied, thanks.

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

* Re: Unable to build iptables on linux kernel 2.6.10 + 2.6.11-rc2 + 2.6.11-rc2-bk5
  2005-02-01  0:51   ` Thomas Graf
  2005-02-01  1:31     ` Pablo Neira
  2005-02-01  7:04     ` Tomáš Macek
@ 2005-02-01 13:17     ` Patrick McHardy
  2 siblings, 0 replies; 7+ messages in thread
From: Patrick McHardy @ 2005-02-01 13:17 UTC (permalink / raw)
  To: Thomas Graf; +Cc: netfilter-devel, Pablo Neira, Colin Harrison

Thomas Graf wrote:

>> 		/* The protocol. */
>>-		u8 protonum;
>>+		u_int8_t protonum;
>> 
>> 		/* The direction (for tuplehash) */
>>-		u8 dir;
>>+		u_int8_t dir;
>>
>
>I think __u8 would be a better choice.
>
Usually yes, but all netfilter headers use u_intX_t.

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

end of thread, other threads:[~2005-02-01 13:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-27 15:53 Unable to build iptables on linux kernel 2.6.10 + 2.6.11-rc2 + 2.6.11-rc2-bk5 Colin Harrison
2005-01-30 22:27 ` Pablo Neira
2005-02-01  0:51   ` Thomas Graf
2005-02-01  1:31     ` Pablo Neira
2005-02-01  7:04     ` Tomáš Macek
2005-02-01 13:17     ` Patrick McHardy
2005-02-01 13:17   ` Patrick McHardy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.