[lkml]   [2007]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRE: Iptable loop during kernel startup
Ok, this is what happens:

iptable_filter sets up initial_table.
The part that says { IPT_ALIGN(sizeof(struct ipt_standard_target)), "" }
initializes a xt_entry_target struct. target_size gets the value
0x24 and name "".
This is copied to loc_cpu_entry in iptables.c:ipt_register_table()
and translate_table is called
translate_table calls IPT_ENTRY_ITERATE with the
check_entry does t-> = target;

On this particular architecture and in
struct xt_entry_target has the same address (because of the union). So
name that was previously "" gets mangled here.

check_entry returns into translate_table which calls mark_source_chains
mark_source_chains compares t-> with
IPT_STANDARD_TARGET. name has been mangled above and the comparision
fails. On my ARM platform name has not been mangled (I guess this is
because target and name doesn't share address by I haven't checked).

So... Is it really correct to modify the target pointer there?


-----Original Message-----
From: Mikael Starvik
Sent: Wednesday, January 10, 2007 12:29 PM
To: 'Patrick McHardy'; Mikael Starvik
Cc: 'Linux Kernel Mailing List'; Edgar Iglesias; 'Netfilter Development
Subject: RE: Iptable loop during kernel startup

>Which iptables/kernel versions are you using?

2.6.19. After further testing it seams to be a compiler/CPU issue. The exact

same kernelconfig works on ARM. So I have to dig some...


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-01-10 14:53    [W:0.022 / U:3.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site