From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Florian Westphal <fw@strlen.de>
Cc: Shyam Saini <mayhs11saini@gmail.com>,
netfilter-devel@vger.kernel.org, arturo@debian.org
Subject: Re: [PATCH 1/1] extensions: libxt_cluster: Add translation to nft
Date: Wed, 24 May 2017 18:05:22 +0200 [thread overview]
Message-ID: <20170524160522.GA25268@salvia> (raw)
In-Reply-To: <20170524154615.GB32408@breakpoint.cc>
On Wed, May 24, 2017 at 05:46:15PM +0200, Florian Westphal wrote:
> Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> > On Wed, May 24, 2017 at 06:01:51PM +0530, Shyam Saini wrote:
> > > Add translation for cluster to nft
> >
> > I think this should be:
> >
> > -m cluster --cluster-total-nodes 2 --cluster-local-node 1 --cluster-hash-seed 0xdeadbeef
> >
> > should be translated to:
> >
> > jhash ct original saddr mod 2 seed 0xdeadbeef eq 0
> >
> > if --cluster-local-node is 2, then:
> >
> > jhash ct original saddr mod 2 seed 0xdeadbeef eq 1
>
> Looks good. But I think we need to take care of mangling pkttype as
> well, right?
We should if we want to 1:1 translation, yes.
Actually, if we rely on the nft arp mac address mangling (to use
multicast ethernet address, ie. RFC violation to cheat dummy switch
just in case you need this to get a packet flooded to two ports), we
could just do this upfront in the ruleset, ie.
ether daddr 01:00:5e:00:01:01 meta set pkttype host
Using the mac address that we set to arp replies, instead of blind
mangling the mac address.
Anyway, yes, something like:
jhash ct original saddr mod 2 seed 0xdeadbeef eq 0 meta pkttype set host
should be good enough.
next prev parent reply other threads:[~2017-05-24 16:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-24 12:31 [PATCH 1/1] extensions: libxt_cluster: Add translation to nft Shyam Saini
2017-05-24 15:43 ` Florian Westphal
2017-05-25 10:10 ` Shyam Saini
2017-05-24 15:44 ` Pablo Neira Ayuso
2017-05-24 15:46 ` Florian Westphal
2017-05-24 16:05 ` Pablo Neira Ayuso [this message]
2017-05-25 10:12 ` Shyam Saini
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=20170524160522.GA25268@salvia \
--to=pablo@netfilter.org \
--cc=arturo@debian.org \
--cc=fw@strlen.de \
--cc=mayhs11saini@gmail.com \
--cc=netfilter-devel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).