Re: searching tuples in conntrack

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello

I'm having some problems creating a function like count_them and the
hash table it uses. My module is a target extension and connlimit is a
match extension.

So correct me if I'm wrong... basically connlimit creates an extra
hash table with struct xt_connlimit_info *info = par->matchinfo as a
parameter to save conntracks and tuples, but I don't have such info
because i'm making a target extension... Can't I do a lookup directly
to the NFCT list?

How can I initialize the hash table like in connlimit_mt_check() if I
don't work with const struct xt_mtchk_param *par?

Can you point in the right direction? I'm really new to kernel dev.. I
hope I'm not asking too much of you

Regards


On Wed, Sep 26, 2012 at 3:32 PM, Jan Engelhardt <jengelh@xxxxxxx> wrote:
> On Wednesday 2012-09-26 19:29, Miguel Alejandro González wrote:
>
>>Hello,
>>
>>I have been reading some kernel code trying to find a function that
>>searches the conntrack hash table for a transport address and returns
>>the given tuple. Is there any way to do this? I found a function in
>>the nat code called find_appropriate_src but i think it only works for
>>the nat table...
>
> nf_conntrack_find_get(...) is the one to use for CT lookup.
> (Cf. xt_connlimit.c)
>
> --
> To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux