Skip to contentSkip to conversation

string matching in kernel 2.6

DISCUSSION Ming-Ching Tiew 2 participants 2 messages Jul 25, 2005

lore
Share & tools
lore
#0 lore raw
Quoted 8 lines

From: "Jan Engelhardt" <[email protected]>

Quoted 4 lines

If neither works, you can try abusing ipt_layer7 ;-) See http://l7-filter.sf.net/

I had a quick look at the source of ipt_layer7, it's linearising the skb so that the pattern can be matched. For ipp2p, it simply skip the non-linear skb (and it has been accepted into pom-ng).

So I think it should be quite easy if one wants to also handle the non-linear case, ie just linearise the skb. Not efficient, but it should work. Right ?

Cheers.

#1 lore raw
Quoted 5 lines
Quoted 2 lines
Quoted 2 lines

If neither works, you can try abusing ipt_layer7 ;-) See http://l7-filter.sf.net/

I had a quick look at the source of ipt_layer7, it's linearising the skb so that the pattern can be matched. For ipp2p, it simply

A right, yes, it linearizes, but only for the first 2048 bytes (the default buffer size). But anyway, what if in these first 2048 bytes two rules would match? You'd anyway get nonpredictable results.

Jan Engelhardt