Resetting SKB CT

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

 



I'm developing a GPL module, normally kernel modules arent that hard
to debug. But this error has me stumped.

What the correct way to clear the CT from a SKB (i.e make it
UNTRACKED), and remove that CT from the conntrack DB.

I tried the following code:
/*
Reset any conntrack connection (removing from db)
*/
static void ts3ct_reset(struct sk_buff *skb){
    struct nf_conn *ct;
    enum ip_conntrack_info ctinfo;

    ct = nf_ct_get(skb, &ctinfo);
    if (ct && ctinfo != IP_CT_UNTRACKED){
        nf_ct_set(skb, NULL, IP_CT_UNTRACKED);
        nf_ct_kill(ct);
        nf_ct_put(ct);
    }
}


I can't see the issue, can you?



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux