All of lore.kernel.org
 help / color / mirror / Atom feed
From: Henrik Nordstrom <hno@marasystems.com>
To: Eric Leblond <eric@regit.org>
Cc: netfilter-devel@lists.netfilter.org, <nufw-devel@nongnu.org>
Subject: Re: [PATCH] Add mark to packet from libipq
Date: Thu, 16 Oct 2003 09:08:24 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.44.0310160902520.6046-100000@filer.marasystems.com> (raw)
In-Reply-To: <1066262957.20541.15.camel@porky>

On Thu, 16 Oct 2003, Eric Leblond wrote:

> Hi,
> 
> I've done really slight modification to the ip_queue module and to
> lip_ipq to add a fonction that can change the mark of a packet and set a
> verdict to it (its name is ipq_set_vwmark).
> 
> It permits to NuFW to add a mark equal to user id on packet, thus
> enabling to set up a users based QOS, accounting, ... 

I have one question regarding the mark mask value in the kernel message..  
what is the purpose of this? Todays implementation looks rather wasteful
as the userspace may just as well apply the mask before the value is sent
to the kernel.

If you are to have a mask I propose this mask indicates which bits to save 
of the original mark, not a mask to the new mark value. I.e. something 
like this:

            /* set mark of associated skb */
            entry->skb->nfmark = vmsg->nfmark | (entry->skb->nfmark & vmsg->mask);

(alernately mask may be inverted)

but in reality this is not needed either as the userspace knows the
original mask and can a apply whatever transformations it likes 
when giving the new verdict mask.

Regards
Henrik

  reply	other threads:[~2003-10-16  7:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-16  0:09 [PATCH] Add mark to packet from libipq Eric Leblond
2003-10-16  7:08 ` Henrik Nordstrom [this message]
2003-10-16  7:23   ` Eric Leblond
2003-10-16  7:31     ` Henrik Nordstrom
2003-10-16 22:13       ` Eric Leblond

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=Pine.LNX.4.44.0310160902520.6046-100000@filer.marasystems.com \
    --to=hno@marasystems.com \
    --cc=eric@regit.org \
    --cc=netfilter-devel@lists.netfilter.org \
    --cc=nufw-devel@nongnu.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.