All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Stephanie Lockwood-Childs <sjl@vctlabs.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] netfilter_queue: byte order of mark
Date: Sat, 08 Dec 2007 04:05:07 +0100	[thread overview]
Message-ID: <475A09E3.4080407@trash.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0712071544240.2760@dent.vctlabs.com>

Stephanie Lockwood-Childs wrote:
> when trying to set marks with netfilter_queue library, I discovered 
> there is
> a discrepency in byte ordering between the library and the 
> nfnetlink_queue
> kernel model. The kernel code expects to receive the mark attribute in
> network order
>
> net/netfilter/nfnetlink_queue.c
> if (nfqa[NFQA_MARK-1])
>     entry->skb->mark = ntohl(*(__be32 *)
>                 NFA_DATA(nfqa[NFQA_MARK-1]));
>
> so netfilter_queue library should put the mark into network order when
> sending it.

Yes, its a stupid bug and even I got bitten by it multiple times,
but we can't change it since users already rely on this behaviour.
You could introduce a new, fixed version of set_verdict_mark and
deprecate the old one.

  reply	other threads:[~2007-12-08  3:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-07 23:50 [PATCH] netfilter_queue: byte order of mark Stephanie Lockwood-Childs
2007-12-08  3:05 ` Patrick McHardy [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-12-07 23:35 Stephanie Lockwood-Childs

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=475A09E3.4080407@trash.net \
    --to=kaber@trash.net \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=sjl@vctlabs.com \
    /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.