[Click] click-fastclassifier breaks alignment alignment
rootkit85 at yahoo.it
rootkit85 at yahoo.it
Fri Apr 23 08:36:06 EDT 2010
click-fastclassier generates code which produces _lots_ of unaligned
accesses on MIPS platform.
For example this code snippet:
FastClassifier_a_aeth::length_unchecked_push(Packet *p)
{
const unsigned *data = (const unsigned *)(p->data() - 2);
step_0:
if ((data[3] & 0xffff) != 0x800)
goto step_4;
[...]
is wrong even if the packet is properly aligned, as it starts reading
double words from a pointer which address %4 != 0
this could be easily fixed by using uint8 in the byte matching code.
As the fastclassifier tool is quite a lot of code, do you know any
fast way to change it in order to fix?
Thanks a lot,
Matteo Croce
More information about the click
mailing list