1 --- a/include/linux/netfilter/xt_string.h
2 +++ b/include/linux/netfilter/xt_string.h
4 #define XT_STRING_MAX_PATTERN_SIZE 128
5 #define XT_STRING_MAX_ALGO_NAME_SIZE 16
8 - XT_STRING_FLAG_INVERT = 0x01,
9 - XT_STRING_FLAG_IGNORECASE = 0x02
14 u_int16_t from_offset;
15 @@ -16,15 +11,7 @@ struct xt_string_info
16 char algo[XT_STRING_MAX_ALGO_NAME_SIZE];
17 char pattern[XT_STRING_MAX_PATTERN_SIZE];
30 /* Used internally by the kernel */
31 struct ts_config __attribute__((aligned(8))) *config;
32 --- a/net/netfilter/xt_string.c
33 +++ b/net/netfilter/xt_string.c
34 @@ -29,16 +29,12 @@ string_mt(const struct sk_buff *skb, con
36 const struct xt_string_info *conf = matchinfo;
37 struct ts_state state;
40 memset(&state, 0, sizeof(struct ts_state));
42 - invert = (match->revision == 0 ? conf->u.v0.invert :
43 - conf->u.v1.flags & XT_STRING_FLAG_INVERT);
45 return (skb_find_text((struct sk_buff *)skb, conf->from_offset,
46 conf->to_offset, conf->config, &state)
47 - != UINT_MAX) ^ invert;
48 + != UINT_MAX) ^ conf->invert;
51 #define STRING_TEXT_PRIV(m) ((struct xt_string_info *)(m))
52 @@ -50,7 +46,6 @@ string_mt_check(const char *tablename, c
54 struct xt_string_info *conf = matchinfo;
55 struct ts_config *ts_conf;
56 - int flags = TS_AUTOLOAD;
58 /* Damn, can't handle this case properly with iptables... */
59 if (conf->from_offset > conf->to_offset)
60 @@ -59,15 +54,8 @@ string_mt_check(const char *tablename, c
62 if (conf->patlen > XT_STRING_MAX_PATTERN_SIZE)
64 - if (match->revision == 1) {
65 - if (conf->u.v1.flags &
66 - ~(XT_STRING_FLAG_IGNORECASE | XT_STRING_FLAG_INVERT))
68 - if (conf->u.v1.flags & XT_STRING_FLAG_IGNORECASE)
69 - flags |= TS_IGNORECASE;
71 ts_conf = textsearch_prepare(conf->algo, conf->pattern, conf->patlen,
73 + GFP_KERNEL, TS_AUTOLOAD);
77 @@ -84,17 +72,6 @@ static void string_mt_destroy(const stru
78 static struct xt_match string_mt_reg[] __read_mostly = {
83 - .checkentry = string_mt_check,
85 - .destroy = string_mt_destroy,
86 - .matchsize = sizeof(struct xt_string_info),
93 .checkentry = string_mt_check,
95 @@ -104,17 +81,6 @@ static struct xt_match string_mt_reg[] _
100 - .family = AF_INET6,
101 - .checkentry = string_mt_check,
102 - .match = string_mt,
103 - .destroy = string_mt_destroy,
104 - .matchsize = sizeof(struct xt_string_info),
111 .checkentry = string_mt_check,