From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Hans Schillstrom <hans.schillstrom@ericsson.com>
Cc: Hans Schillstrom <hans@schillstrom.com>,
"kaber@trash.net" <kaber@trash.net>,
"jengelh@medozas.de" <jengelh@medozas.de>,
"netfilter-devel@vger.kernel.org"
<netfilter-devel@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH 2/3] NETFILTER module xt_hmark, new target for HASH based fwmark
Date: Mon, 23 Jan 2012 18:01:50 +0100 [thread overview]
Message-ID: <20120123170150.GA26351@1984> (raw)
In-Reply-To: <201201231049.17165.hans.schillstrom@ericsson.com>
Hi Hans,
On Mon, Jan 23, 2012 at 10:49:16AM +0100, Hans Schillstrom wrote:
> On Monday 23 January 2012 10:12:41 Pablo Neira Ayuso wrote:
> > On Mon, Jan 23, 2012 at 12:20:15AM +0100, Hans Schillstrom wrote:
> > > The text should clarify that this is valid for the fragments not the "flow"
> > >
> > > > I've got one scenario that may break with this assumption:
> > > >
> > > > 1) your traffic follows one path over router A and B to reach your
> > > > firewall F which requires no fragmentation at all.
>
> I missed the last part here "requires no fragmentation at all"
>
> > > > 2) path to router B becomes broken while there are established flows
> > > > with firewall F.
> > > > 3) router A decides to forward packets to router C, which fragment
> > > > packets because it is using smaller MTU than router A.
> > > > 4) packets arrive to firewall F, then hashing is calculated based on
> > > > addresses, not ports, and you load-sharing becomes inconsistent.
> > > >
> > > > This can rarely happen, but it does, it would break.
> > > >
> > > > To fix this, I think that HMARK requires that you have to specify the
> > > > hashing strategy. If you want to support fragments, use only
> > > > addresses. If you're sure you will not get fragments, use layer 3 and
> > > > layer 4 information.
>
> This can be acomplished by setting --hmark-sp-mask and --hmark-dp-mask to Zero
> Then you don't use port in the hash calc.
OK, it would be great if we can provide a cleaner interface. The
current behaviour uses layer3-layer4 tuple hashing plus defaulting to
layer3 in case of fragments.
I'd prefer explicit configuration options:
--hashmark-method layer3
use only address for hashing, this is fragment safe.
--hashmark-method layer3-layer4
use addresses and ports for hashing, fragments not supported
unless defrag is enabled.
Still, if you want to support the current behaviour, it should be
something like:
--hashmark-method layer3-layer4-fragments
use addresses and ports for hashing, for fragments default to
layer3 hashing. Document scenario in which hash consistency
may break.
The behaviour of the target has to be specified by the configurations.
Defaulting to internal assumptions seems obscure to me.
next prev parent reply other threads:[~2012-01-23 17:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-13 9:52 [v7 PATCH 0/3] NETFILTER new target module, HMARK Hans Schillstrom
2012-01-13 9:52 ` [PATCH 1/3] NETFILTER added flags to ipv6_find_hdr() Hans Schillstrom
2012-01-13 9:52 ` [PATCH 2/3] NETFILTER module xt_hmark, new target for HASH based fwmark Hans Schillstrom
2012-01-22 21:44 ` Pablo Neira Ayuso
2012-01-22 23:20 ` Hans Schillstrom
2012-01-23 9:12 ` Pablo Neira Ayuso
2012-01-23 9:49 ` Hans Schillstrom
2012-01-23 17:01 ` Pablo Neira Ayuso [this message]
2012-01-24 17:56 ` Hans Schillstrom
2012-01-24 18:15 ` Pablo Neira Ayuso
2012-01-25 10:14 ` Hans Schillstrom
2012-01-25 11:49 ` Pablo Neira Ayuso
2012-01-25 12:28 ` Hans Schillstrom
2012-01-13 9:52 ` [v7 PATCH 3/3] NETFILTER userspace part for target HMARK Hans Schillstrom
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=20120123170150.GA26351@1984 \
--to=pablo@netfilter.org \
--cc=hans.schillstrom@ericsson.com \
--cc=hans@schillstrom.com \
--cc=jengelh@medozas.de \
--cc=kaber@trash.net \
--cc=netdev@vger.kernel.org \
--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).