const u32 *data, const u32 *mask, unsigned int words);
#ifdef CONFIG_NF_CONNTRACK_LABELS
-int nf_conntrack_labels_init(struct net *net);
-void nf_conntrack_labels_fini(struct net *net);
+int nf_conntrack_labels_init(void);
+void nf_conntrack_labels_fini(void);
#else
-static inline int nf_conntrack_labels_init(struct net *n) { return 0; }
-static inline void nf_conntrack_labels_fini(struct net *net) {}
+static inline int nf_conntrack_labels_init(void) { return 0; }
+static inline void nf_conntrack_labels_fini(void) {}
#endif
#ifdef CONFIG_NF_CONNTRACK_ZONES
nf_ct_extend_unregister(&nf_ct_zone_extend);
#endif
+ nf_conntrack_labels_fini();
nf_conntrack_helper_fini();
nf_conntrack_timeout_fini();
nf_conntrack_ecache_fini();
nf_ct_free_hashtable(net->ct.hash, net->ct.htable_size);
nf_conntrack_proto_fini(net);
- nf_conntrack_labels_fini(net);
nf_conntrack_helper_pernet_fini(net);
nf_conntrack_ecache_pernet_fini(net);
nf_conntrack_tstamp_pernet_fini(net);
if (ret < 0)
goto err_helper;
+ ret = nf_conntrack_labels_init();
+ if (ret < 0)
+ goto err_labels;
+
#ifdef CONFIG_NF_CONNTRACK_ZONES
ret = nf_ct_extend_register(&nf_ct_zone_extend);
if (ret < 0)
#ifdef CONFIG_NF_CONNTRACK_ZONES
err_extend:
- nf_conntrack_helper_fini();
+ nf_conntrack_labels_fini();
#endif
+err_labels:
+ nf_conntrack_helper_fini();
err_helper:
nf_conntrack_timeout_fini();
err_timeout:
ret = nf_conntrack_helper_pernet_init(net);
if (ret < 0)
goto err_helper;
-
- ret = nf_conntrack_labels_init(net);
- if (ret < 0)
- goto err_labels;
-
ret = nf_conntrack_proto_init(net);
if (ret < 0)
goto err_proto;
return 0;
err_proto:
- nf_conntrack_labels_fini(net);
-err_labels:
nf_conntrack_helper_pernet_fini(net);
err_helper:
nf_conntrack_ecache_pernet_fini(net);
.id = NF_CT_EXT_LABELS,
};
-int nf_conntrack_labels_init(struct net *net)
+int nf_conntrack_labels_init(void)
{
- if (net_eq(net, &init_net))
- return nf_ct_extend_register(&labels_extend);
- return 0;
+ return nf_ct_extend_register(&labels_extend);
}
-void nf_conntrack_labels_fini(struct net *net)
+void nf_conntrack_labels_fini(void)
{
- if (net_eq(net, &init_net))
- nf_ct_extend_unregister(&labels_extend);
+ nf_ct_extend_unregister(&labels_extend);
}