All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fernando Fernandez Mancera <ffmancera@riseup.net>
To: Phil Sutter <phil@nwl.cc>, Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nft v2 1/6] osf: add version fingerprint support
Date: Wed, 13 Mar 2019 16:22:27 +0100	[thread overview]
Message-ID: <2b070950-1441-ae1b-fe52-72dc7bc4455e@riseup.net> (raw)
In-Reply-To: <20190313150634.GM4851@orbyte.nwl.cc>

Hi Phil,

On 3/13/19 4:06 PM, Phil Sutter wrote:
> Hi Fernando,
> 
> On Wed, Mar 13, 2019 at 03:15:51PM +0100, Fernando Fernandez Mancera wrote:
>> On 3/13/19 12:27 PM, Phil Sutter wrote:
>>> On Wed, Mar 13, 2019 at 11:14:04AM +0100, Fernando Fernandez Mancera wrote:
>>>> Hi Phil,
>>>>
>>>> On 3/13/19 10:44 AM, Phil Sutter wrote:
>>>>> Hi Fernando,
>>>>>
>>>>> On Mon, Mar 11, 2019 at 04:14:12PM +0100, Fernando Fernandez Mancera wrote:
>>>>>> Add support for version fingerprint in "osf" expression. Example:
>>>>>>
>>>>>> table ip foo {
>>>>>> 	chain bar {
>>>>>> 		type filter hook input priority filter; policy accept;
>>>>>> 		osf ttl skip name "Linux"
>>>>>> 		osf ttl skip name version "Linux:4.20"
>>>>>> 	}
>>>>>> }
>>>>>
>>>>> The syntax seems overly complicated to me, although I'm not really
>>>>> familiar with OSF so may lack background knowledge. Any reason why you
>>>>> didn't go with 'osf ttl skip name "Linux" version "4.20"' instead?
>>>>>
>>>>
>>>> You are right, 'osf ttl skip name "Linux" version "4.20"' was my first
>>>> thought but in compilation time the parser applies shift-reduce to the
>>>> expression.. I decided 'osf ttl skip name version "Linux:4.20"' to avoid
>>>> a complex workaround in the parser.
>>>
>>> Shift/reduce warnings often require voodoo to fix, but it's not
>>> impossible. :)
>>>
>>> Regarding my suggestion, I see that this string is actually the
>>> right-hand-side of a relational expression. To implement what I had in
>>> mind you would have to turn osf expression into a statement.
>>>
>>>> The fingerprints database syntax is "genre:version:subtype:details" so
>>>> the nft 'osf' expression syntax is like the original one.
>>>
>>> Can we deduce required flags from the given string on RHS? I.e. by
>>> looking at the amount of semi-colons and the number of characters
>>> between them? I'm assuming the syntax works like "genre::subtype" and
>>> "genre:::details" to omit certain parts, is that correct?
>>>
>>
>> Yes that is correct. We can do that if you think it is more suitable. Do
>> we all agree then?
> 
> I think reducing redundancy is always a good thing. Only having to
> specify the string and extracting the required info from it would make
> it easier for users I guess.
> 
> That whole string is sent to the kernel, right? So it wouldn't make
> sense to split the fields it is made up from into separate properties in
> JSON, correct?
> 
> Thanks, Phil
> 

Yes, that makes sense. In this case, we don't need flags support anymore
so it reduces the patch series. Should we continue with the
implementation of the flags support or just forget about it until needed
again?

  reply	other threads:[~2019-03-13 15:22 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 [this message]
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
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=2b070950-1441-ae1b-fe52-72dc7bc4455e@riseup.net \
    --to=ffmancera@riseup.net \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=phil@nwl.cc \
    /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.