aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJoonwoo Park <joonwpark81@gmail.com>2008-07-08 05:38:56 -0400
committerDavid S. Miller <davem@davemloft.net>2008-07-08 05:38:56 -0400
commit4ad3f26162ece5aca3045fd45e15dd99acea4a0e (patch)
tree05c0db40febdc89055f2572bc0cf42388f798ead /include
parentdde77e604497dada6f224a685278dfb27747ae52 (diff)
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. A new revision 1 was added, in the meantime invert of xt_string_info was moved into flags as a flag. If revision is 1, The flag XT_STRING_FLAG_INVERT indicates invert matching. Signed-off-by: Joonwoo Park <joonwpark81@gmail.com> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/netfilter/xt_string.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/linux/netfilter/xt_string.h b/include/linux/netfilter/xt_string.h
index bb21dd1aee2d..8a6ba7bbef9f 100644
--- a/include/linux/netfilter/xt_string.h
+++ b/include/linux/netfilter/xt_string.h
@@ -4,6 +4,11 @@
4#define XT_STRING_MAX_PATTERN_SIZE 128 4#define XT_STRING_MAX_PATTERN_SIZE 128
5#define XT_STRING_MAX_ALGO_NAME_SIZE 16 5#define XT_STRING_MAX_ALGO_NAME_SIZE 16
6 6
7enum {
8 XT_STRING_FLAG_INVERT = 0x01,
9 XT_STRING_FLAG_IGNORECASE = 0x02
10};
11
7struct xt_string_info 12struct xt_string_info
8{ 13{
9 u_int16_t from_offset; 14 u_int16_t from_offset;
@@ -11,7 +16,15 @@ struct xt_string_info
11 char algo[XT_STRING_MAX_ALGO_NAME_SIZE]; 16 char algo[XT_STRING_MAX_ALGO_NAME_SIZE];
12 char pattern[XT_STRING_MAX_PATTERN_SIZE]; 17 char pattern[XT_STRING_MAX_PATTERN_SIZE];
13 u_int8_t patlen; 18 u_int8_t patlen;
14 u_int8_t invert; 19 union {
20 struct {
21 u_int8_t invert;
22 } v0;
23
24 struct {
25 u_int8_t flags;
26 } v1;
27 } u;
15 28
16 /* Used internally by the kernel */ 29 /* Used internally by the kernel */
17 struct ts_config __attribute__((aligned(8))) *config; 30 struct ts_config __attribute__((aligned(8))) *config;