All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@eurodev.net>
To: Amir Goldstein <amir@codefidence.com>
Cc: Netfilter Development Mailinglist <netfilter-devel@lists.netfilter.org>
Subject: Re: ongoing textsearch/string match - 3 patches
Date: Mon, 26 Dec 2005 04:50:55 +0100	[thread overview]
Message-ID: <43AF689F.2070106@eurodev.net> (raw)
In-Reply-To: <18730dc50512250828i2f214c8di49c348f03c84593f@mail.gmail.com>

Amir Goldstein wrote:
> On 12/23/05, Pablo Neira Ayuso <pablo@eurodev.net> wrote:
> 
>>>test:
>>>------
>>>I have tested ongoing string match using netcat UDP connection
>>>and it successfully matched the string:
>>>s
>>>tr
>>>ing
>>
>>So, in this example, my understanding is that you want to find matchings
>> splitted in several packets.
>>
>>>which was sent in different 3 packets.
>>>the netcat test required using --from 28 to skip the udp header and
>>>some test code to ignore the new line characters.
>>
>>I'm curious: We implement matching through fragments with KMP (not for
>>BM yet). So, what kind of application would require such pattern
>>matching policy?
>>
> 
> it's the basics for content filtering in netfilter.
> of course, more work needs to be done:
> - connect this code with connection tracking
> - handle out of order tcp packets

OK. But I'm still in doubt about the usefulness of matching a pattern
between packets. What kind of application splits a request, represented
in the form of a pattern, between packets? Going back to your example:

1st packet) s
2nd packet) tr
3rd packet) ing

Could you comment any realistic scenario?

>>>Index: linux-2.6.14/include/linux/netfilter_ipv4/ipt_string.h
>>>===================================================================
>>>--- linux-2.6.14.orig/include/linux/netfilter_ipv4/ipt_string.h       2005-11-23 19:13:42.000000000 +0200
>>>+++ linux-2.6.14/include/linux/netfilter_ipv4/ipt_string.h    2005-11-23 19:16:38.000000000 +0200
>>>@@ -11,8 +11,10 @@
>>>      char      algo[IPT_STRING_MAX_ALGO_NAME_SIZE];
>>>      char      pattern[IPT_STRING_MAX_PATTERN_SIZE];
>>>      u_int8_t  patlen;
>>>+     u_int8_t  ongoing;
>>>      u_int8_t  invert;
>>>      struct ts_config __attribute__((aligned(8))) *config;
>>>+     struct ts_state __attribute__((aligned(8))) *state;
>>> };
>>
>>Unfortunately, you can't do this. This would break backward
>>compatibility for previous versions of iptables. The correct way to do
>>this is using the matches/targets versioning (see ipt_MARK for an
>>example). We can revisit this later.
>>
> 
> it would take me some time before I can look into the match versioning.
> should I just post the patches as they are now?

Hold on with the versioning stuff. We can do this later if I finally
understand the target of your contribution. Thanks!

-- 
Pablo

  parent reply	other threads:[~2005-12-26  3:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <18730dc50512220611nfea98e2l88da4f25c97f341d@mail.gmail.com>
2005-12-22 22:22 ` ongoing textsearch/string match - 3 patches Pablo Neira Ayuso
     [not found]   ` <18730dc50512250828i2f214c8di49c348f03c84593f@mail.gmail.com>
2005-12-26  3:50     ` Pablo Neira Ayuso [this message]
2006-01-26 11:51       ` amir73il
2006-01-26 13:35         ` 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=43AF689F.2070106@eurodev.net \
    --to=pablo@eurodev.net \
    --cc=amir@codefidence.com \
    --cc=netfilter-devel@lists.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 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.