Hi Harald, I split the the array of struct ftp_search in two, one for patterns to match in IP_CT_DIR_ORIGINAL, and the other for IP_CT_DIR_REPLY. This way we save four if's conditions and we only loop twice for every direction (worst case). I also move up if (found==0) which means that pattern was not found. I consider that this is the general case. Am I missing anything? Some considerations, my patch of the new expectation API must be applied before applying this patch. btw, this patch could have some problems with: http://lists.netfilter.org/pipermail/netfilter-devel/2004-March/014516.html that patch was already reviewed by Patrick and you. Anyway that one is simple so I have no problem in merge them to this one. regards, Pablo