remove connections notification by conntrack?
Pablo Neira Ayuso
pablo at netfilter.org
Sun Sep 24 17:34:15 CEST 2006
Thomas Mader wrote:
> On Sunday 24 September 2006 05:10, Pablo Neira Ayuso wrote:
>> events & IPCT_DESTROY
>>
>>> printk("We have been notified that connection %d was deleted!\n",
>>> ct->id); }
>>>
>>> return 0;
>>> }
>>>
>>>
>>> static struct notifier_block ctnl_notifier = {
>>> .notifier_call = ipaddr_conntrack_event,
>>> };
>>>
>>>
>>> static int __init init(void)
>>> {
>>> int ret;
>>> need_conntrack();
>>> ret = ip_conntrack_register_notifier(&ctnl_notifier);
>>> if (ret < 0) {
>>> printk("ipaddr_init: cannot register notifier.\n");
>>> goto err_unreg_notifier;
>>> }
>>> //ip_conntrack_destroyed = destroyed_connect;
>>>
>>> printk(KERN_CRIT "init!\n");
>>> return ipt_register_match(&ipaddr_match);
>>>
>>> err_unreg_notifier:
>>> ip_conntrack_unregister_notifier(&ctnl_notifier);
>>> return 1;
>>> }
>>>
>>> But the problem remains the same. It works for TCP and I get properly
>>> notified about those but not about UDP.
>> Try with what I told you above and let me know if it works
>
> No it doesn't. I tried "events & IPCT_DESTROY" already and it didn't work. Now
> I tested it once again with same result.
Works fine here with the toy module attached:
Sep 24 17:30:52 Decadence kernel: protonum=17
Sep 24 17:31:26 Decadence last message repeated 2 times
Sep 24 17:31:47 Decadence kernel: protonum=6
--
The dawn of the fourth age of Linux firewalling is coming; a time of
great struggle and heroic deeds -- J.Kadlecsik got inspired by J.Morris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: modulo.c
Type: text/x-csrc
Size: 781 bytes
Desc: not available
Url : /pipermail/netfilter-devel/attachments/20060924/3ccf7119/modulo.c
More information about the netfilter-devel
mailing list