|
@@ -22,6 +22,7 @@
|
|
|
#include <linux/notifier.h>
|
|
|
#include <linux/kernel.h>
|
|
|
#include <linux/netdevice.h>
|
|
|
+#include <linux/rtnetlink.h>
|
|
|
|
|
|
#include <net/netfilter/nf_conntrack.h>
|
|
|
#include <net/netfilter/nf_conntrack_l3proto.h>
|
|
@@ -221,8 +222,10 @@ void nf_conntrack_l3proto_unregister(struct nf_conntrack_l3proto *proto)
|
|
|
synchronize_rcu();
|
|
|
|
|
|
/* Remove all contrack entries for this protocol */
|
|
|
+ rtnl_lock();
|
|
|
for_each_net(net)
|
|
|
nf_ct_iterate_cleanup(net, kill_l3proto, proto);
|
|
|
+ rtnl_unlock();
|
|
|
}
|
|
|
EXPORT_SYMBOL_GPL(nf_conntrack_l3proto_unregister);
|
|
|
|
|
@@ -333,8 +336,10 @@ void nf_conntrack_l4proto_unregister(struct nf_conntrack_l4proto *l4proto)
|
|
|
synchronize_rcu();
|
|
|
|
|
|
/* Remove all contrack entries for this protocol */
|
|
|
+ rtnl_lock();
|
|
|
for_each_net(net)
|
|
|
nf_ct_iterate_cleanup(net, kill_l4proto, l4proto);
|
|
|
+ rtnl_unlock();
|
|
|
}
|
|
|
EXPORT_SYMBOL_GPL(nf_conntrack_l4proto_unregister);
|
|
|
|