All of lore.kernel.org
 help / color / mirror / Atom feed
From: Deti Fliegl <deti@fliegl.de>
To: Harald Welte <laforge@netfilter.org>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: iptables & new CONNMARK 32bit marks
Date: Sun, 30 Oct 2005 11:27:07 +0100	[thread overview]
Message-ID: <43649FFB.6070200@fliegl.de> (raw)
In-Reply-To: <20051030094349.GZ4479@sunbeam.de.gnumonks.org>

Harald Welte wrote:
>>when using kernel 2.6.14rc5 the mark values have become 32bit but
>>latest iptables code still uses 64bit values. 
> 
> 
> It sends a 64bit value to the kernel, there's nothing wrong with that.
> The kernel is able to parse that.
> 
> 
>>This causes the kernel module to say "CONNMARK: Only supports 32bit
>>mark" 
> 
> 
> This should only happen if you actually specify a mark that is bigger
> than 0xffffffff.  
Yes you are right but if you are on a 64bit platform you might run into 
trouble with these initializations in libipt_connmark.c:

markinfo->mask = ~0UL or if(mask != ~0UL)

This will evaluate to 0xffffffffffffffff on a long variable. You should 
netter should use 0xffffffff than the hack above.

Further a #ifdef KERNEL_64_USERSPACE_32 version of the code does not 
make sense to me as 32bit will always be 32bit even on 64bit platforms :)

> Please post the specific rules in case of any doubt.
iptables -t mangle -A PREROUTING --proto tcp -j CONNMARK --restore-mark

Deti

  reply	other threads:[~2005-10-30 10:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-24 15:57 iptables & new CONNMARK 32bit marks Deti Fliegl
2005-10-30  9:43 ` Harald Welte
2005-10-30 10:27   ` Deti Fliegl [this message]
2005-11-02  9:25   ` Deti Fliegl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43649FFB.6070200@fliegl.de \
    --to=deti@fliegl.de \
    --cc=laforge@netfilter.org \
    --cc=netfilter-devel@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.