Thread (5 messages) 5 messages, 2 authors, 2008-06-27

Re: [PATCH 6/8 v2] netfilter: fix string extension for case insensitive pattern matching

From: Joonwoo Park <hidden>
Date: 2008-06-27 09:49:34
Also in: netfilter-devel

2008/6/26 Patrick McHardy [off-list ref]:
Joonwoo Park wrote:
quoted
netfilter: fix string extension for case insensitive pattern matching

The flag XT_STRING_FLAG_IGNORECASE indicates case insensitive string
matching.
netfilter can find cmd.exe, Cmd.exe, cMd.exe and etc easily.

Also this patch won't break compatibility since we have 2 bytes space
between invert and config, due to config was 8 bytes aligned.
So we can put a new value 'flags' in xt_string_info between invert and
config safely.
If previous version of iptables interact with this kernel, to kernel
side, flags will be set to zero and to user side, flags will be ignored.
This makes it hard for userspace to know whether insensitive
search is supported or not, similar for possible future flag
additions.

Please

- add a new revision for userspace to know whether flags are
 supported at all. You don't need to duplicate the checkentry
 function for this since the structure layout didn't change,
 you can simply parse flags dependant on match->revision.
 Userspace can use the existance of the new revision as
 indication that flags are supported.

- check for unknown flags and return an error
Hi Patrick,
Thanks for your advice.
Since I'm traveling America, so maybe I could catch up these things
you've asked next weekend.
I don't need to rush, do I?

Thanks again,
Joonwoo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help