All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Shivani Bhardwaj <shivanib134@gmail.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] extensions: libxt_MARK: Add translation to nft
Date: Wed, 23 Dec 2015 19:21:18 +0100	[thread overview]
Message-ID: <20151223182118.GA19872@breakpoint.cc> (raw)
In-Reply-To: <CAKHNQQEqnUejMapByGwqr+Lhh5Q+Hsd=As9qeTHrEihQWDCW2Q@mail.gmail.com>

Shivani Bhardwaj <shivanib134@gmail.com> wrote:
> I'm unsure if the options or-set, and-set are supported in nftables. I
> cannot find much about them. Please let me know if there are
> translations corresponding to these options as well, I'll send another
> patch then.

You have to combine another mark + binop, i.e.:

filter input mark set mark or 1
  [ meta load mark => reg 1 ]
  [ bitwise reg 1 = (reg=1 & 0xfffffffe ) ^ 0x00000001 ]
  [ meta set mark with reg 1 ]

i.e., load mark into register, or with 1 (or whatever),
then set new mark based on result.

Replace or with and to get --and-mark.

  reply	other threads:[~2015-12-23 18:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-23 15:33 [PATCH] extensions: libxt_MARK: Add translation to nft Shivani Bhardwaj
2015-12-23 15:38 ` Shivani Bhardwaj
2015-12-23 18:21   ` Florian Westphal [this message]
2015-12-23 16:15 ` Jan Engelhardt
2015-12-23 16:22   ` Shivani Bhardwaj
2015-12-25 12:14 ` Pablo Neira Ayuso
  -- strict thread matches above, loose matches on Subject: below --
2015-12-05 13:19 [PATCH] extensions: libxt_mark: " Shivani Bhardwaj
2015-12-05 19:14 ` Pablo Neira Ayuso
2015-12-05 19:44   ` Shivani Bhardwaj
2015-12-05 23:14   ` Pablo Neira Ayuso
2015-12-06  2:48     ` Shivani Bhardwaj

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=20151223182118.GA19872@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=shivanib134@gmail.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.