* ipt_MARK/xt_MARK usage problem
@ 2006-08-22 6:21 Jan Engelhardt
2006-08-22 6:29 ` Patrick McHardy
0 siblings, 1 reply; 6+ messages in thread
From: Jan Engelhardt @ 2006-08-22 6:21 UTC (permalink / raw)
To: Linux Kernel Mailing List, netfilter
Hello,
kernel 2.6.17 ships with xt_MARK, but iptables 1.3.5 still uses ipt_MARK.
In essence, I cannot use `iptables -j MARK` giving me
# iptables -A INPUT -j MARK --set-mark 1
iptables: Unknown error 4294967295
I have seen this before and the problem behind this strange error (-1) is
that the .targetsize/.matchsize variables in the kernel modules do not
match their userspace parts.
However, this time it seems to be something different:
# iptables -t mangle -A INPUT -j MARK --set-mark 1
Works without problems. Am I missing something?
How do I get MARK back to work in -t filter -- possibly without hacking in
xt_MARK.c?
Jan Engelhardt
--
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ipt_MARK/xt_MARK usage problem
2006-08-22 6:21 ipt_MARK/xt_MARK usage problem Jan Engelhardt
@ 2006-08-22 6:29 ` Patrick McHardy
2006-08-22 6:31 ` Jan Engelhardt
0 siblings, 1 reply; 6+ messages in thread
From: Patrick McHardy @ 2006-08-22 6:29 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: Linux Kernel Mailing List, netfilter
Jan Engelhardt wrote:
> kernel 2.6.17 ships with xt_MARK, but iptables 1.3.5 still uses ipt_MARK.
> In essence, I cannot use `iptables -j MARK` giving me
>
> # iptables -A INPUT -j MARK --set-mark 1
> iptables: Unknown error 4294967295
>
> I have seen this before and the problem behind this strange error (-1) is
> that the .targetsize/.matchsize variables in the kernel modules do not
> match their userspace parts.
No, its a bug in the iptables userspace version you're using, which
makes it report any error as "Unknown error 4294967295". The
error itself is that you're using MARK in the filter table.
> However, this time it seems to be something different:
>
> # iptables -t mangle -A INPUT -j MARK --set-mark 1
>
> Works without problems. Am I missing something?
> How do I get MARK back to work in -t filter -- possibly without hacking in
> xt_MARK.c?
You won't, its not supposed to work in the filter table.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ipt_MARK/xt_MARK usage problem
2006-08-22 6:29 ` Patrick McHardy
@ 2006-08-22 6:31 ` Jan Engelhardt
2006-08-22 6:38 ` Patrick McHardy
0 siblings, 1 reply; 6+ messages in thread
From: Jan Engelhardt @ 2006-08-22 6:31 UTC (permalink / raw)
To: Patrick McHardy; +Cc: Linux Kernel Mailing List, netfilter
>
>No, its a bug in the iptables userspace version you're using, which
>makes it report any error as "Unknown error 4294967295". The
>error itself is that you're using MARK in the filter table.
>
>> Works without problems. Am I missing something?
>> How do I get MARK back to work in -t filter -- possibly without hacking in
>> xt_MARK.c?
>
>You won't, its not supposed to work in the filter table.
This worked in 2.6.16, where the ipt_mark_reg_v1 strucutre in xt_MARK.c did
not have a .table limiter. (It also worked in practice, i.e. packets got
marked like they should.) I do not see why this was changed.
Jan Engelhardt
--
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ipt_MARK/xt_MARK usage problem
2006-08-22 6:31 ` Jan Engelhardt
@ 2006-08-22 6:38 ` Patrick McHardy
0 siblings, 0 replies; 6+ messages in thread
From: Patrick McHardy @ 2006-08-22 6:38 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: netfilter, Linux Kernel Mailing List
Jan Engelhardt wrote:
>>>How do I get MARK back to work in -t filter -- possibly without hacking in
>>>xt_MARK.c?
>>
>>You won't, its not supposed to work in the filter table.
>
>
> This worked in 2.6.16, where the ipt_mark_reg_v1 strucutre in xt_MARK.c did
> not have a .table limiter. (It also worked in practice, i.e. packets got
> marked like they should.) I do not see why this was changed.
That is not true, all versions of the mark target starting in 2.4 had
the same check in the checkentry function.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ipt_MARK/xt_MARK usage problem
@ 2006-08-22 6:38 ` Patrick McHardy
0 siblings, 0 replies; 6+ messages in thread
From: Patrick McHardy @ 2006-08-22 6:38 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: Linux Kernel Mailing List, netfilter
Jan Engelhardt wrote:
>>>How do I get MARK back to work in -t filter -- possibly without hacking in
>>>xt_MARK.c?
>>
>>You won't, its not supposed to work in the filter table.
>
>
> This worked in 2.6.16, where the ipt_mark_reg_v1 strucutre in xt_MARK.c did
> not have a .table limiter. (It also worked in practice, i.e. packets got
> marked like they should.) I do not see why this was changed.
That is not true, all versions of the mark target starting in 2.4 had
the same check in the checkentry function.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ipt_MARK/xt_MARK usage problem
2006-08-22 6:38 ` Patrick McHardy
(?)
@ 2006-08-22 9:17 ` Jan Engelhardt
-1 siblings, 0 replies; 6+ messages in thread
From: Jan Engelhardt @ 2006-08-22 9:17 UTC (permalink / raw)
To: Patrick McHardy; +Cc: Linux Kernel Mailing List, netfilter
>>>>How do I get MARK back to work in -t filter -- possibly without hacking in
>>>>xt_MARK.c?
>>>
>>>You won't, its not supposed to work in the filter table.
>>
>> This worked in 2.6.16, where the ipt_mark_reg_v1 strucutre in xt_MARK.c did
>> not have a .table limiter. (It also worked in practice, i.e. packets got
>> marked like they should.) I do not see why this was changed.
>
>That is not true, all versions of the mark target starting in 2.4 had
>the same check in the checkentry function.
Oh sorry I mixed something up. It is CONNMARK which did work (and continues
to do so) in -t filter... everything fine, sorry for the noise.
Jan Engelhardt
--
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-08-22 9:17 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-22 6:21 ipt_MARK/xt_MARK usage problem Jan Engelhardt
2006-08-22 6:29 ` Patrick McHardy
2006-08-22 6:31 ` Jan Engelhardt
2006-08-22 6:38 ` Patrick McHardy
2006-08-22 6:38 ` Patrick McHardy
2006-08-22 9:17 ` Jan Engelhardt
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.