string patch for 2.6
This is a patch against pong-20041229 that will add string support for kernel 2.6
Dimitris
string/info +0 -1
@@ -1,4 +1,3 @@ Author: Emmanuel Roger <[email protected]> Status: Working, not with kernel 2.4.9 Repository: extra -Requires: linux < 2.6.0
string/linux-2.6/Documentation/Configure.help.ladd +8 -0
@@ -0,0 +1,8 @@ +CONFIG_IP_NF_MATCH_UNCLEAN +String match support (EXPERIMENTAL) +CONFIG_IP_NF_MATCH_STRING + String matching alows you to match packets which contain a + specified string of characters. + + If you want to compile it as a module, say M here and read + Documentation/modules.txt. If unsure, say `N'.
string/linux-2.6/include/linux/netfilter_ipv4/ipt_string.h +21 -0
@@ -0,0 +1,21 @@ +#ifndef _IPT_STRING_H +#define _IPT_STRING_H + +/* *** PERFORMANCE TWEAK *** +* Packet size and search string threshold, +* above which sublinear searches is used. */ +#define IPT_STRING_HAYSTACK_THRESH 100 +#define IPT_STRING_NEEDLE_THRESH 20 + +#define BM_MAX_NLEN 256 +#define BM_MAX_HLEN 1024 + +typedef char *(*proc_ipt_search ) (char *,char *,int ,int ); + +struct ipt_string_info { +char string[BM_MAX_NLEN ]; +u_int16_t invert; +u_int16_t len; +}; + +#endif /* _IPT_STRING_H */
string/linux-2.6/net/ipv4/netfilter/Kconfig.ladd +9 -0
@@ -0,0 +1,9 @@ +config IP_NF_MATCH_STRING + tristate 'String match support' + depends on IP_NF_IPTABLES + help + String matching alows you to match packets which contain a + specified string of characters. + + If you want to compile it as a module, say M here and read + Documentation/modules.txt. If unsure, say `N'.
string/linux-2.6/net/ipv4/netfilter/Makefile.ladd +2 -0
@@ -0,0 +1,2 @@ +obj-$(CONFIG_IP_NF_MATCH_PHYSDEV) += ipt_physdev.o +obj-$(CONFIG_IP_NF_MATCH_STRING) += ipt_string.o
string/linux-2.6/net/ipv4/netfilter/ipt_string.c +221 -0
221 lines not on this page · raw message
Quoted 2 lines · Dimitris Kotsonis
This is a patch against pong-20041229 that will add string support for kernel 2.6
sorry if I'm sounding rude, but it has been discussed on this list _OVER AND OVER AGAIN_. And patches like yours can be found alrady in the archive.
still it is broken. think of non-linear skbs.
Quoted 1 line
Dimitris
Signature · 5 lines
- Harald Welte <[email protected]> http://www.netfilter.org/ ============================================================================ "Fragmentation is like classful addressing -- an interesting early architectural error that shows how much experimentation was going on while IP was being designed." -- Paul Vixie