netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Fernando Fernandez Mancera <ffmancera@riseup.net>,
	netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nft v2 1/6] osf: add version fingerprint support
Date: Wed, 20 Mar 2019 14:46:54 +0100	[thread overview]
Message-ID: <20190320134654.GD4851@orbyte.nwl.cc> (raw)
In-Reply-To: <20190319110624.dy7wqatdtrxy3452@salvia>

On Tue, Mar 19, 2019 at 12:06:24PM +0100, Pablo Neira Ayuso wrote:
> Hi Phil,
> 
> On Mon, Mar 18, 2019 at 06:42:43PM +0100, Phil Sutter wrote:
> > On Fri, Mar 15, 2019 at 06:13:28PM +0100, Pablo Neira Ayuso wrote:
> [...]
> > > * Kernel would need to inconditionally build the OS:version string.
> > 
> > Yes, exactly. nft_osf.c would return "OS:version:subtype:opt" and
> > nft_cmp.c will do the right thing if nft_cmp_expr->len is set to RHS
> > length.
> 
> Problem are sets. They need a fixed size for the string, or we would
> need to adjust the size to the largest string in the set. In case of
> dynamic sets, this boils down to the maximum string length since we
> don't know what the length of future element would be.

I knew there's a rub! :)

> > > * We may need to ask users to break existing osf ruleset so they
> > >   explicitly add the wildcard at the end, ie.
> > > 
> > >         osf name "Windows\*"
> > >         osf name "Linux:4.\*"
> > 
> > Not if cmp expr len is set correctly.
> 
> cmp expr len is set correctly using the wildcard.
> 
> I think we should aim to make this work fine with sets and maps. The
> wildcard cannot be used from there, where exact matches are needed. We
> should encourage users to use osf with sets and maps.
> 
> > > then, in the future (if ever needed) add subtypes:
> > > 
> > >         osf subtype "Linux:2.4:cluster"
> > 
> > IMHO this is still redundant: RHS contains <something>:<something>, user
> > wants to match on OS and version. RHS contains <sth>:<sth>:<sth>, user
> > wants to match on OS, version and subtype.
> 
> This is not possible with dynamic sets, there the set may be empty so
> we do not know how many colons will be used :-)

Speaking of sets, it would be awesome if we could support something
like:

| osf genre { "Linux:2.4", "Windows" }

i.e., having elements with varying "granularity". Do you think that's
feasible? If so, how could we support that? Maybe using a concatenation
like:

| osf name . osf version { "Linux" . "2.4", "Windows" . "*" }

Cheers, Phil

  reply	other threads:[~2019-03-20 13:46 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-11 15:14 [PATCH nft v2 1/6] osf: add version fingerprint support Fernando Fernandez Mancera
2019-03-11 15:14 ` [PATCH nft v2 2/6] json: osf: add version json support Fernando Fernandez Mancera
2019-03-11 15:14 ` [PATCH nft v2 3/6] tests: py: add osf tests with versions Fernando Fernandez Mancera
2019-03-11 15:14 ` [PATCH nft v2 4/6] doc: add osf version option to man page Fernando Fernandez Mancera
2019-03-11 15:14 ` [PATCH nft v2 5/6] files: osf: update pf.os with newer OS fingerprints Fernando Fernandez Mancera
2019-03-11 15:14 ` [PATCH nft v2 6/6] files: pf.os: merge the signatures spllited by version Fernando Fernandez Mancera
2019-03-13  9:44 ` [PATCH nft v2 1/6] osf: add version fingerprint support Phil Sutter
2019-03-13 10:14   ` Fernando Fernandez Mancera
2019-03-13 11:27     ` Phil Sutter
2019-03-13 14:15       ` Fernando Fernandez Mancera
2019-03-13 15:06         ` Phil Sutter
2019-03-13 15:22           ` Fernando Fernandez Mancera
2019-03-13 15:34             ` Phil Sutter
2019-03-13 16:46               ` Fernando Fernandez Mancera
2019-03-14 11:14                 ` Fernando Fernandez Mancera
2019-03-14 13:58                   ` Pablo Neira Ayuso
2019-03-14 17:34                     ` Phil Sutter
2019-03-14 18:24                       ` Fernando Fernandez Mancera
2019-03-15 10:03                         ` Phil Sutter
2019-03-15 17:13                           ` Pablo Neira Ayuso
2019-03-15 20:21                             ` Fernando Fernandez Mancera
2019-03-16  9:05                               ` Pablo Neira Ayuso
2019-03-17 17:10                                 ` Fernando Fernandez Mancera
2019-03-18 17:42                             ` Phil Sutter
2019-03-19 11:06                               ` Pablo Neira Ayuso
2019-03-20 13:46                                 ` Phil Sutter [this message]
2019-03-21  8:32                                   ` Pablo Neira Ayuso
2019-03-21 11:15                                     ` Phil Sutter
2019-03-21 11:18                                       ` Pablo Neira Ayuso
2019-03-21 14:06                                         ` Phil Sutter
2019-03-21 16:57                                           ` Pablo Neira Ayuso
2019-03-21 18:14                                             ` Phil Sutter
2019-03-14 20:07                       ` Pablo Neira Ayuso
2019-03-14 20:13                         ` [PATCH nft v2 1/6] osf: add version fingerprint supportg Pablo Neira Ayuso

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=20190320134654.GD4851@orbyte.nwl.cc \
    --to=phil@nwl.cc \
    --cc=ffmancera@riseup.net \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.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).