syakyou / opendpi

Automatically exported from code.google.com/p/opendpi
GNU Lesser General Public License v3.0
0 stars 1 forks source link

Not able to insmod xt_opendpi.ko kernel module and nf_conntrack_netlink.ko together #7

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Insmod xt_opendip.ko and later nf_conntrack_netlink.ko or vice-versa.

What is the expected output? What do you see instead?
shows device or resource busy.

What version of the product are you using? On what operating system?
working with fedora12 kernel version 2.6.32.21 

Please provide any additional information below.
console log shows:
insmod: error inserting 'src/xt_opendpi.ko': -1 Device or resource busy
dmesg shows:
ctnetlink v0.93: registering with nfnetlink.
xt_opendpi 0.1 (OpenDPI wrapper module).
xt_opendpi: error registering notifier.

This will happen if You have CONFIG_NF_CONNTRACK_EVENTS enabled. 

#ifdef CONFIG_NF_CONNTRACK_EVENTS
       ret = nf_conntrack_register_notifier(&ctnl_notifier);
       if (ret < 0) {
               pr_err("ctnetlink_init: cannot register notifier.\n");
               goto err_unreg_exp_subsys;
       }
        ret = nf_ct_expect_register_notifier(&ctnl_notifier_exp);
        if (ret < 0) {
                pr_err("ctnetlink_init: cannot expect register notifier.\n");
               goto err_unreg_notifier;
       }
#endif

Above code is from ctnetlink_init function.
nf_conntrack_register_notifier code is exclusive and protected by rcu locking.

We may not be able to use both nf_conntrack_netlink( needed for 
conntrack-tools) and opendpi with both registering notifier for events.

Original issue reported on code.google.com by shail140284 on 22 Oct 2010 at 5:59

GoogleCodeExporter commented 9 years ago
Need patch kernel with notifier call chains that was removed after kernel 
version 2.6.28 to make both conntrack tools and opendpi work together.

Original comment by shail140284 on 13 Jun 2011 at 11:50