netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Compiling ebtables statically or dynamically results in different behaviour
@ 2009-04-07 13:53 Tim Verhoeven
  0 siblings, 0 replies; 5+ messages in thread
From: Tim Verhoeven @ 2009-04-07 13:53 UTC (permalink / raw)
  To: netfilter-devel

Hi,

I have a very strange problem with ebtables. I'm using it on CentOS 5
(2.6.18 kernel) and when using the dynamically compiled version
(version 2.0.8-2) I can't create a new chain. When using the same
version but compiled statically it works. The difference is clearly to
see when using a strace :

Good behavior (statically compiled) :

setsockopt(3, SOL_IP, 0x80 /* IP_??? */,
"filter\0\0\0\352tv;\0\0\0\0\0\0\0\0\0\0\0008\2\0\0\0\0\0\0"..., 312)
= 0
exit_group(0)                           = ?


Bad behavior (dynamically compiled) :

setsockopt(3, SOL_IP, 0x80 /* IP_??? */,
"filter\0\0\0\352tv;\0\0\0\0\0\0\0\0\0\0\0e\3\0\0\0\0\0\0"..., 312) =
-1 EINVAL (Invalid argument)
write(2, "The kernel doesn't support a cer"..., 113The kernel doesn't
support a certain ebtables extension, consider recompiling your kernel
or insmod the extension) = 113
write(2, ".\n", 2.
)                      = 2
exit_group(-1)                          = ?

For some reason the one version sets different options then the other.
I've tried different things (compiling against the standard kernel
include files (kernel-devel), compiling against the included include
files, using some gcc options, ...). But none of those worked. Any
hints are appreciated.

Regards,
Tim

-- 
Tim Verhoeven - tim.verhoeven.be@gmail.com - 0479 / 88 11 83

Hoping the problem  magically goes away  by ignoring it is the
"microsoft approach to programming" and should never be allowed.
(Linus Torvalds)

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

* Re: Compiling ebtables statically or dynamically results in different behaviour
@ 2009-04-08  9:49 bdschuym@pandora.be
  2009-04-08  9:57 ` Tim Verhoeven
  0 siblings, 1 reply; 5+ messages in thread
From: bdschuym@pandora.be @ 2009-04-08  9:49 UTC (permalink / raw)
  To: Tim Verhoeven, netfilter-devel

What is your exact command and what type of processor are you using?

cheers,
Bart

>----- Oorspronkelijk bericht -----
>Van
: Tim Verhoeven [mailto:tim.verhoeven.be@gmail.com]
>Verzonden
: dinsdag
, april
 7, 2009 03:53 PM
>Aan
: netfilter-devel@vger.kernel.org
>Onderwerp
: Compiling ebtables statically or dynamically results in different 	behaviour
>
>Hi,
>
>I have a very strange problem with ebtables. I'm using it on CentOS 5
>(2.6.18 kernel) and when using the dynamically compiled version
>(version 2.0.8-2) I can't create a new chain. When using the same
>version but compiled statically it works. The difference is clearly to
>see when using a strace :
>
>Good behavior (statically compiled) :
>
>setsockopt(3, SOL_IP, 0x80 /* IP_??? */,
>"filter\0\0\0\352tv;\0\0\0\0\0\0\0\0\0\0\0008\2\0\0\0\0\0\0"..., 312)
>= 0
>exit_group(0)                           = ?
>
>
>Bad behavior (dynamically compiled) :
>
>setsockopt(3, SOL_IP, 0x80 /* IP_??? */,
>"filter\0\0\0\352tv;\0\0\0\0\0\0\0\0\0\0\0e\3\0\0\0\0\0\0"..., 312) =
>-1 EINVAL (Invalid argument)
>write(2, "The kernel doesn't support a cer"..., 113The kernel doesn't
>support a certain ebtables extension, consider recompiling your kernel
>or insmod the extension) = 113
>write(2, ".\n", 2.
>)                      = 2
>exit_group(-1)                          = ?
>
>For some reason the one version sets different options then the other.
>I've tried different things (compiling against the standard kernel
>include files (kernel-devel), compiling against the included include
>files, using some gcc options, ...). But none of those worked. Any
>hints are appreciated.




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

* Re: Compiling ebtables statically or dynamically results in different behaviour
  2009-04-08  9:49 bdschuym@pandora.be
@ 2009-04-08  9:57 ` Tim Verhoeven
  2009-04-20  9:27   ` Tim Verhoeven
  0 siblings, 1 reply; 5+ messages in thread
From: Tim Verhoeven @ 2009-04-08  9:57 UTC (permalink / raw)
  To: bdschuym@pandora.be; +Cc: netfilter-devel

On Wed, Apr 8, 2009 at 11:49 AM, bdschuym@pandora.be
<bdschuym@telenet.be> wrote:
> What is your exact command and what type of processor are you using?
>

The command run is "ebtables -N 1000"

This is /proc/cpuinfo :
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Xeon(R) CPU           E5430  @ 2.66GHz
stepping        : 6
cpu MHz         : 2666.758
cache size      : 6144 KB
physical id     : 0
siblings        : 1
core id         : 0
cpu cores       : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu tsc msr pae mce cx8 apic mtrr mca cmov pat pse36
clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall lm constant_tsc
pni monitor ds_cpl vmx est tm2 cx16 xtpr lahf_lm
bogomips        : 6669.91
clflush size    : 64
cache_alignment : 64
address sizes   : 38 bits physical, 48 bits virtual

It's a standard Intel Xeon (the server is a IBM HS21 Blade).

Regards,
Tim

-- 
Tim Verhoeven - tim.verhoeven.be@gmail.com - 0479 / 88 11 83

Hoping the problem  magically goes away  by ignoring it is the
"microsoft approach to programming" and should never be allowed.
(Linus Torvalds)

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

* Re: Compiling ebtables statically or dynamically results in different behaviour
  2009-04-08  9:57 ` Tim Verhoeven
@ 2009-04-20  9:27   ` Tim Verhoeven
  2009-04-20 17:43     ` Bart De Schuymer
  0 siblings, 1 reply; 5+ messages in thread
From: Tim Verhoeven @ 2009-04-20  9:27 UTC (permalink / raw)
  To: bdschuym@pandora.be; +Cc: netfilter-devel

On Wed, Apr 8, 2009 at 11:57 AM, Tim Verhoeven
<tim.verhoeven.be@gmail.com> wrote:
> On Wed, Apr 8, 2009 at 11:49 AM, bdschuym@pandora.be
> <bdschuym@telenet.be> wrote:
>> What is your exact command and what type of processor are you using?
>>
>
> The command run is "ebtables -N 1000"
>
> This is /proc/cpuinfo :
> processor       : 0
> vendor_id       : GenuineIntel
> cpu family      : 6
> model           : 23
> model name      : Intel(R) Xeon(R) CPU           E5430  @ 2.66GHz
...snip...

Hi again,

Is there any update about this issue ? Can I do anything to help debug
 the problem ? I have test machines available.

Thanks,
Tim

-- 
Tim Verhoeven - tim.verhoeven.be@gmail.com - 0479 / 88 11 83

Hoping the problem  magically goes away  by ignoring it is the
"microsoft approach to programming" and should never be allowed.
(Linus Torvalds)
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: Compiling ebtables statically or dynamically results in different behaviour
  2009-04-20  9:27   ` Tim Verhoeven
@ 2009-04-20 17:43     ` Bart De Schuymer
  0 siblings, 0 replies; 5+ messages in thread
From: Bart De Schuymer @ 2009-04-20 17:43 UTC (permalink / raw)
  To: Tim Verhoeven; +Cc: netfilter-devel

Hi,

I'm currently lacking the time, but if you have some programming 
experience, a dump of the data sent to the kernel for the static and 
dynamic version of the code would be great. See ebt_deliver_table() in 
communication.c: the data pointed to by repl and repl->entries 
specifically. Please use a simple table: start with an empty one before 
issuing the command.

cheers,
Bart

Tim Verhoeven schreef:
> On Wed, Apr 8, 2009 at 11:57 AM, Tim Verhoeven
> <tim.verhoeven.be@gmail.com> wrote:
>   
>> On Wed, Apr 8, 2009 at 11:49 AM, bdschuym@pandora.be
>> <bdschuym@telenet.be> wrote:
>>     
>>> What is your exact command and what type of processor are you using?
>>>
>>>       
>> The command run is "ebtables -N 1000"
>>
>> This is /proc/cpuinfo :
>> processor       : 0
>> vendor_id       : GenuineIntel
>> cpu family      : 6
>> model           : 23
>> model name      : Intel(R) Xeon(R) CPU           E5430  @ 2.66GHz
>>     
> ...snip...
>
> Hi again,
>
> Is there any update about this issue ? Can I do anything to help debug
>  the problem ? I have test machines available.
>
> Thanks,
> Tim
>
>   


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

end of thread, other threads:[~2009-04-20 17:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-07 13:53 Compiling ebtables statically or dynamically results in different behaviour Tim Verhoeven
  -- strict thread matches above, loose matches on Subject: below --
2009-04-08  9:49 bdschuym@pandora.be
2009-04-08  9:57 ` Tim Verhoeven
2009-04-20  9:27   ` Tim Verhoeven
2009-04-20 17:43     ` Bart De Schuymer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).