netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 5/8 v2] textsearch: fix finite state machine textsearch for handling case insensitive searching
@ 2008-06-25 10:25 Joonwoo Park
  2008-06-25 11:02 ` Patrick McHardy
  0 siblings, 1 reply; 2+ messages in thread
From: Joonwoo Park @ 2008-06-25 10:25 UTC (permalink / raw)
  To: Patrick McHardy
  Cc: netdev, netfilter-devel, Thomas Graf, Pablo Neira Ayuso,
	Joonwoo Park

For fsm text search, handle case insensitive parameter as -EINVAL.

Signed-off-by: Joonwoo Park <joonwpark81@gmail.com>
---
 lib/ts_fsm.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/lib/ts_fsm.c b/lib/ts_fsm.c
index af575b6..5696a35 100644
--- a/lib/ts_fsm.c
+++ b/lib/ts_fsm.c
@@ -257,7 +257,7 @@ found_match:
 }
 
 static struct ts_config *fsm_init(const void *pattern, unsigned int len,
-				     gfp_t gfp_mask)
+				    gfp_t gfp_mask, int flags)
 {
 	int i, err = -EINVAL;
 	struct ts_config *conf;
@@ -269,6 +269,9 @@ static struct ts_config *fsm_init(const void *pattern, unsigned int len,
 	if (len  % sizeof(struct ts_fsm_token) || ntokens < 1)
 		goto errout;
 
+	if (flags & TS_IGNORECASE)
+		goto errout;
+
 	for (i = 0; i < ntokens; i++) {
 		struct ts_fsm_token *t = &tokens[i];
 
@@ -284,6 +287,7 @@ static struct ts_config *fsm_init(const void *pattern, unsigned int len,
 	if (IS_ERR(conf))
 		return conf;
 
+	conf->flags = flags;
 	fsm = ts_config_priv(conf);
 	fsm->ntokens = ntokens;
 	memcpy(fsm->tokens, pattern, len);
-- 
1.5.4.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 5/8 v2] textsearch: fix finite state machine textsearch for handling case insensitive searching
  2008-06-25 10:25 [PATCH 5/8 v2] textsearch: fix finite state machine textsearch for handling case insensitive searching Joonwoo Park
@ 2008-06-25 11:02 ` Patrick McHardy
  0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2008-06-25 11:02 UTC (permalink / raw)
  To: Joonwoo Park; +Cc: netdev, netfilter-devel, Thomas Graf, Pablo Neira Ayuso

Joonwoo Park wrote:
> For fsm text search, handle case insensitive parameter as -EINVAL.

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-06-25 11:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-25 10:25 [PATCH 5/8 v2] textsearch: fix finite state machine textsearch for handling case insensitive searching Joonwoo Park
2008-06-25 11:02 ` Patrick McHardy

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).